Hi,
Okay, here's what I'm trying to do... I have a form, and I want to be
able to automatically log the time that users are working on that
particular project. This is my thought process, and I just can't get
it to work. I'm using Access2000, and I'm still somewhat new to
figuring it out.
1st Time button - start time - this would be a macro that goes and
updates a table that has the start time, end time, project id and an
autonumber field (so it will just keep adding to the table). There
would be a date & time stamp that goes into the start time column.
2nd Time button - end time - Same basic function - it would put a date/
time stamp into the end time field.
I want to use this to create a record to show how long the user was
working on the project (end time - start time = time worked). I've
tried setting up macros, and I can't get them to actually update the
table. I've had little experience with macros and I could really use
some help.
Thanks!
Gretchen
|
|
0
|
|
|
|
Reply
|
gretchenschaeffer
|
8/8/2007 10:05:51 PM |
|
gretchenschaeffer@gmail.com wrote in
news:1186610751.771544.297850@o61g2000hsh.googlegroups.com:
> Hi,
>
> Okay, here's what I'm trying to do... I have a form, and I
> want to be able to automatically log the time that users are
> working on that particular project. This is my thought
> process, and I just can't get it to work. I'm using
> Access2000, and I'm still somewhat new to figuring it out.
>
> 1st Time button - start time - this would be a macro that goes
> and updates a table that has the start time, end time, project
> id and an autonumber field (so it will just keep adding to the
> table). There would be a date & time stamp that goes into the
> start time column.
>
> 2nd Time button - end time - Same basic function - it would
> put a date/ time stamp into the end time field.
>
> I want to use this to create a record to show how long the
> user was working on the project (end time - start time = time
> worked). I've tried setting up macros, and I can't get them to
> actually update the table. I've had little experience with
> macros and I could really use some help.
>
> Thanks!
>
> Gretchen
>
You need two queries, one to append a new record to the table
filling in the user's name or id, the project id and the
date/time. you could run this from a macro or 1 line of visual
basic in the OnClick event of your button. You don't need an
autonumber.
The second query is a little more complex, because you have to
find then update an existing record, the one created previously,
so you need as criteria the user id, the project and either the
most recent start, or the start with no end.
Then you run this query using a macro or code from the en time
button, and from the form's OnClose event, in case the user
forgot to click the end time button.
--
Bob Quintal
PA is y I've altered my email address.
--
Posted via a free Usenet account from http://www.teranews.com
|
|
0
|
|
|
|
Reply
|
Bob
|
8/8/2007 10:21:17 PM
|
|
The macro action is OpenQuery.
You actually need two types of queries. You need an append query to add a
new record to the table when the user begins working on a project (and to
put in the start time). Then you need an update query to modify that record
with the end time when the user is done.
Have this action run an update query. The queries will need to read data
from the open form to get the ProjectID value, most likely.
--
Ken Snell
<MS ACCESS MVP>
<gretchenschaeffer@gmail.com> wrote in message
news:1186610751.771544.297850@o61g2000hsh.googlegroups.com...
> Hi,
>
> Okay, here's what I'm trying to do... I have a form, and I want to be
> able to automatically log the time that users are working on that
> particular project. This is my thought process, and I just can't get
> it to work. I'm using Access2000, and I'm still somewhat new to
> figuring it out.
>
> 1st Time button - start time - this would be a macro that goes and
> updates a table that has the start time, end time, project id and an
> autonumber field (so it will just keep adding to the table). There
> would be a date & time stamp that goes into the start time column.
>
> 2nd Time button - end time - Same basic function - it would put a date/
> time stamp into the end time field.
>
> I want to use this to create a record to show how long the user was
> working on the project (end time - start time = time worked). I've
> tried setting up macros, and I can't get them to actually update the
> table. I've had little experience with macros and I could really use
> some help.
>
> Thanks!
>
> Gretchen
>
|
|
0
|
|
|
|
Reply
|
Ken
|
8/8/2007 10:39:03 PM
|
|
|
2 Replies
762 Views
(page loaded in 0.499 seconds)
Similiar Articles: Macros to update table? - microsoft.public.access.formscoding ...Hi, Okay, here's what I'm trying to do... I have a form, and I want to be able to automatically log the time that users are working on that particula... Need Query or Macro to Update Form - microsoft.public.access ...I have a form with two textboxes, both tied to field names in the table I am using for the form. The two fields are GroupName1 and Groupname2. I ne... Refresh form after macro updates fields - microsoft.public.access ...I'm using Access 07. I have a form Employees based on a table of the same name. I also have a form Policies also based on a table of that same name.... Pivot Table Filtering - Macro - microsoft.public.excel.programming ...Update pivot table report filter using cell value - microsoft ... Update Report Filters using simple macro – a Dynamic Pivot Chart ..... Pivot Table Report Filters are ... Word 2007 Macro - Document Save Location & Update TOC ...2) The macro inserts content into the document from a number of external files. Once this is done, I'd like to have it update the table of contents. Macro Help - Updating Master List - microsoft.public.excel ...Macro Help - Updating Master List - microsoft.public.excel ... Hi all i need help please, Using Access 2000 and up I have an update macro that is doing update to tables ... Update pivot table report filter using cell value - microsoft ...Convert Pivot Table to Values in Macro - microsoft.public.excel ... Update pivot table report filter using cell value - microsoft ... Update pivot table report filter ... Forms to update queries - microsoft.public.access.queries ...Need Query or Macro to Update Form - microsoft.public.access ... I have a form with two textboxes, both tied to field names in the table I am using for the form. Table of Contents Automatic Update - microsoft.public.word ...The following pair of macros should work: Sub FileSave() Dim t As TableOfContents For Each t In ActiveDocument.TablesOfContents t.Update Next t If ActiveDocument ... Pull Table field value in a macro variable - microsoft.public ...Macros to update table? - microsoft.public.access.formscoding ... macro to run automatically when a field is updated - microsoft ... Pull Table field value in a macro ... After Update Macro Event - Microsoft Corporation: Software ...To view this example in the macro designer, use the following steps: Open the table for which you want to capture the After Update event. On the Table tab, in the After ... Macros to update table? - microsoft.public.access.formscoding ...Hi, Okay, here's what I'm trying to do... I have a form, and I want to be able to automatically log the time that users are working on that particula... Attaching Logic to Data Using Data Macros in Access 2010 ApplicationsThis action accumulates the total purchased for each item in the Order Details table. Figure 5. Accumulate the total for the order. To complete the macro, and update the ... Faster Pivot Table Macros with Manual Update - YouTubehttp://www.contextures.com/tiptech.html#PivotTables Macros can run slowly on a large pivot table, or one with calculated fields or calculated items. By ... Excel - Auto Update Pivot Tables, Macro? - Im a little... - Free ...Auto Update Pivot Tables, Macro? - Im a little perplexed I have a pivot table that is linked... - Free Excel Help 7/20/2012 9:51:14 PM
|