Macro to update field value

  • Thread starter Thread starter Bill
  • Start date Start date
B

Bill

I am very familiar with excel macros, but have an app
that is more Access/database dependent than spreadsheet.
I am trying to analyze data in a field that has just
previously been input (previous record) and default a
new, different field in a new record to that value +1.

EG: Field Names: TimeIn, Time Out

Record 1: Time in: 01:22:45:24
Time Out 01:24:10:09

Record 2: Time In (Should Incr to: 01:22:45:25)

I input data in form view, and want to make the new value
a default for that field, but allow it to be overwritten.
I want to print that value to the field only if this is a
new entry, not if it has been previously created.
This should be very simple, but I am not familiar enough
with the Access commands to start.
 
try a SetValue action, with a statement in the condition column, as

[Time In] Is Null

that will prevent setting the value of Time In when there's already a value
in the field, but it's not based on the *record* being new. so if you go to
an existing record where Time In is null, the macro will run.

hth
 
Back
Top