Filling in dates automatically (More difficult than it sounds)

Benjamin Bolduc

Registered User.
Local time
Today, 09:09
Joined
Jan 4, 2002
Messages
169
Hi everyone!
I have a form with 2 subforms. All of the information that will be entered in these forms includes dates. THere has to be a date with every record, but with so many records being entered at a time, this could get tedious. I was wondering if it was possible to have both of my date fields (In subforms) automatically enter a date on a unbound field on my Main Form.
So, in other words, I could type in "4/4/02" in a text box on my main form and then every record in both of my subforms would automatically fill that date in.
Is it possible? Could some kind, smart and wonderful person help me out? I'd greatly appreciate it! Thanks
smile.gif
 
Why would Properties>Data>Default: Date() not work for every record on form and subform? Then whenever you start a record, it defaults to today's date. This will work for subforms as well as main forms.

Unless you mean to change the new subform to the same date as the main form, even if it's not today's date. Then you'd want something like this in the GotFocus event of [DateField] in your subform:
Code:
If Me.NewRecord And IsNull(Me.DateField) Then Me.DateField = Forms![MainForm].[MainDateField]

HTH,
David R
 
Last edited:
Thanks! That worked perfectly. You're great!
wink.gif
 

Users who are viewing this thread

Back
Top Bottom