Still can't get it right.
I put the code in:
Validate:insert start embed
RES:RESERV_DATE=p_web.GetValue('loc:RESERV_DATE')
!stop('REserve Date: ' & format(RES:RESERV_DATE,@d2))
This gets the initialized value that was FIRST in the loc:reserv_date variable (I initialize it to today() + 1).
This code happens AFTER I have used the calendar to change the loc:reserv_date when I click on SAVE, as I witnessed by putting a stop or even without a stop, the reservation date is the original initialized date from loc:reserv_date.
For instance, I initialize loc:reserv_date to 8/22/2008.
in routines before generate form:
loc:RESERV_DATE=today()+1
p_web.SetSessionValue('loc:RESERV_DATE',loc:RESERV_DATE)
The form displays 8/22/2008. I use the calendar and change the loc:reserv_date to 8/23/2008. It displays 8/23/2008.
However, when I use the code above in my validate insert I get 8/22/2008.
One other piece of code that I had to put in there was an if statement that got rid of the code in the RestoreMem embed... the code there would always under every circumstance zero out the loc:reserv_date.
I did put the loc:reserv_date in the StoreMem embed and that does store it ok... the restore just doesn't work right.
I have put the code to get the loc:reserv_date in just about every embed.. and there is no where that it ever picks up the date that the calendar put into the field on the screen... or even if I just type in the date into the memory field... it is not memorized anywhere where I can find it.
It's like it's on the screen.. but doesn't get into the variable.
Is there any sample code anywhere that has an insert form with a date memory variable that is captured on the save and put into a field variable?
Thanks,
Ray
VMT