I'm putting a database together at work for a committee, but one of their requirements is giving me trouble.
They want a table and a form that will track trips made by patients at a hospital. Two of the fields on the table, TripDate and DateValidation, also need to be on a form. I've got that part taken care of.
On the form, when the TripDate is entered, they want the DateValidation to be populated from the TripDate with the day of the week. For instance, if TripDate is 11/21/2008 they want Friday to appear in the DateValidation textbox and on the underlying table. Then they want me to disable the textbox so they can see what the day of the week is, but not allow users to change it.
Initially, I created the two textboxes and put
Expand|Select|Wrap|Line Numbers
- =Format([TripDate],"dddd")
I also tried using Before & After Update events for the TripDate and DateValidation textboxes (separately) with the following code:
Expand|Select|Wrap|Line Numbers
- dim myDate, weekDay
- myDate = TripDate.Value
- weekDay = Format([myDate], "dddd")
- DateValidation.Value = weekDay
Does anyone have any ideas how I can implement this?
Thanks...
~ beacon