repeating previous field entry until changed

R

Robert L

Been awhile, I can not remember how to have a field in new record default to
value of field in previous record. For example I have 10 items to enter with
same date then 10 more items with different date. After entering date, it
remains same in new records until user changes then it remains until changed
again.

I use to know how to do this but I have been away for 5 - 6 years now.

Help appreciated.
 
F

fredg

Been awhile, I can not remember how to have a field in new record default to
value of field in previous record. For example I have 10 items to enter with
same date then 10 more items with different date. After entering date, it
remains same in new records until user changes then it remains until changed
again.

I use to know how to do this but I have been away for 5 - 6 years now.

Help appreciated.

For each control on your form that you wish to carry over to the next
new record .....
If the field is NOT a Date datatype, code that control's AfterUpdate
event:

Me![ControlName].DefaultValue = """" & Me![ControlName] & """"

If the field is a Date datatype, then code that control's AfterUpdate
event:

Me![DateField].DefaultValue = "#" & Me![DateField] & "#"

You'll have to enter the value just once per session.
It will remain the same for each new record until changed.
 

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