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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Making the current value in a field to be a value in the next

Status
Not open for further replies.

shaunacol

Programmer
Jan 29, 2001
226
0
0
GB
I am trying to make the end_date of my field in a form into the start_date of the next record.

Therefore in the afterupdate property of end_date I have written some code:

Me!start_date.defaultvalue = Me!end_date

I was hoping that each time the end date was updated the start date default value would be set to this. Therefore when I go into a new record surley this should work??

Basically what is happening is that the value reads 30 Dec 1999. Not sure why it is displaying this value. No matter how many different dates or ways I try to do this the next record always displays 30-Dec-99.

Please help!
 
Try removing the .defaultvalue part and see if it works.
 
Try storing the value in a string value within the form or as a global array. This will then mean that you when the user goes to the next record, you can append the stored value into the field.

Harpz
 
OK. My first answer was wrong, but after thinking about it, I found a way to make it work. Pretty simple, actually. I created a new database with a couple of boxes to test it. All you have to do is this:

Me!start_date.defaultvalue = Me!end_date.value

Worked for me.




 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top