Macro to update field value

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.
 
T

tina

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top