Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting a field in the next record to default to a value from this rec

Status
Not open for further replies.

shaunacol

Programmer
Jan 29, 2001
226
GB
Can anyone help?

I have date1 and date2 fields in the saem table. I would like the value from date1 to automatically default to the value in date2 on moving to a new record. For example the user will enter date2 and proceed to the next record - I then want date1 of this record to default to that value previously entered as date2.

I have tried putting this code behind the after update property of date2

Me!Date1.defaultvalue = Me!Date2.value

But all it does is fill in date1 of the next record with 30-12-99 every time! It is driving me mad!

Does anyone know what I have done wrong?

Thanks
S
 
Hi,
Try referencing the txtbox with the other.
Put in Control source of date1;

=[date2]

However, as soon as you enter the date in date2 it will show the date in date1 on the form.
Or you can put =[date2] in the Event tab of the Properties Section of the txtbox as afterupdate.

JMP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top