Set two fields to use data from the last record.

Talismanic

Registered User.
Local time
Today, 19:55
Joined
May 25, 2000
Messages
377
I have a time sheet form where you put the Job Name, Job Number, and Week Ending in the form header. Then the data for that job goes in the details section.

In the details section there could be 14 entries to that job but the fields in the header clear themselves as if it is a new record. Is there a way to set those three fields in the header to use the last value until a macro starting a new record is triggered?
 
Here is what it looks like:

Number 3434 Name Incorporated Week 12/12/00[/b]
____________________________________________
Name-----Mon-----Tue-----Wed-----Thu-----Fri
Joe Bob---1-------1-------1-------1--------1
Bill Bob---2-------2-------2-------2--------2

The job data on the top remains the same for each job but when you go to the next line (for Bill Bob) Access treats it all as a new record. I want to make the top three fields keep the same value. I know that I could use a form/subform but I had a ton of trouble getting DLookUps and Totals to work with them.



[This message has been edited by Talismanic (edited 05-26-2000).]
 
I found a soulution:

Create a macro
Action - SetValue
Item - [jobnumber].[DefaultValue]
Expression - """" & [jobnumber] & """"

Repeat it for every field you want to retain data and then set the Before/After Update Event to trigger it. This works for text fields but you can alter it slightly to make it work for numeric values.
 

Users who are viewing this thread

Back
Top Bottom