Defaulted Fields and Changing Dates

ENT

New member
Local time
Today, 19:37
Joined
Mar 29, 2010
Messages
3
Hello,
I'm a fairly new user and learning as I go. I'm working on a project database with a form that has a baseline start date field and a baseline end date field. Those fields will not change. I have two other fields in the same form: revised start date and revised end date that I need to have reflect the baseline dates unless changed by the user. So far I have come up empty handed. Any help would be much appreciated!
Thanks,
ENT
 
When the user types data, I'll assume the logical process would be to input the start date, and then enter the end date. ( are you currently doing this with a user typing the field value?) or do you use a method like a Calendar control?

Personal i like using the calendar because it helps to prevent users from entering 02/07/2009 in one record and 07/02/2009 in another record being that they should both be the same date. A calendar gives a visual, (but it you can also use a longer date format to prevent this)

If you have it where the user is typing data in, then when you double click on the control and go to the "events" tab, you will be able to start doing some vba code on the control. I would use the Lost focus event. Which is when a user clicks on something OTHER than the selected control.. i.e the control losses the focus.

You vba code for this event would be something along the lines of.
me.[Name of revised start date control] = me.[Name of start date control]
no square brackets.
 
Hi. Thanks for the reply! I am using a pop-up calendar for the dates. Would the code you suggested still apply then?
 
If you have a calendar, then i would simply add to the code to get it to add the value to both fields at the same time.

me.startdate = calendar1
me.revisedstartdate = calendar1

or something to that nature.. but I don't know what a "pop up" calendar is. i've only ever used the calendar control. i can only assume it has the same options.

You would put this code on the CALENDAR'S Click Event.
 
Thanks! I'll see what I can do with the info. you gave me.
 

Users who are viewing this thread

Back
Top Bottom