View Full Version : Date control


lab18
03-01-2002, 06:39 PM
I have a field where i enter the date. Now the defaultValue is set to =Date(), but that enters the system date automaticly. What i want is to enter a date and that date stays in the field , so i dont have to enter the date over and over as i enter different records with the same date. I also need it to allow me to enter a new date for the next set of records.
thanks

chrismcbride
03-04-2002, 08:37 AM
I would put a Global variable of type Date into a common module. In the BeforeInsert event of your form, I would check the value of the varible and add it to your record if it is not null. In the AfterUpdate of the form control that actually holds the date, I would update the global variable. Inserting a value into a form control with code does not trigger the AfterUpdate event of the control, so this will mean that only values added manually to the date control will update the global variable.
HTH
Chris

David R
03-04-2002, 10:25 AM
You can also use Ctrl-' to bring down the value of that field from the previous record. This works if you're entering a bunch of archival material in series.

HTH,
David R