Add same value

I

Ian C

[Ctrl] ['] will add the value from the last entry to the
same field.
I want this to happen automatically.
ie I want MS Access to add as a default a value to a
field (in a form) the same value as the last entry to the
same field - automatically with a macro or some code.

Can anyone please help?

regards,
Ian
 
J

Joe Fallon

A simple solution for each field is to use the After_Update event to modify
the default value.
This way, when a new record is created, the field defaults to the previously
entered value.

Private Sub txtName_AfterUpdate()
'That's 4 double quotes on either side!
Me![txtName].DefaultValue = """" & Me![txtName].Value & """"
End Sub
 

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