Access Date Problem With Subform

RobAccess

New member
Local time
Today, 11:28
Joined
Mar 14, 2002
Messages
7
I have a number of text boxes set up with date formats. To enable user to enter todays date quickly I have added the code "txtDate = Date" in the double click event (i.e. when the user double clicks on the text box, it is populated with today's date.

However, I also have a subform set up within this form. This also has a date field, but just cannot get the above code to work. I can use the "Now" funtion but not date. Any one have any idea why?
 
Why not just set the default value of the field to =Date(). Shouldn't it be Me.txtDate=Date, no quotes.
 
Rich - thanks for your response. The date required won't always be today's date.
 
What Rich is saying is that if more than 50% of the time the DateRequired will be today's date, then setting the Default value to Date() will speed up your data entry, rather than requiring them to double-click.
You can always change a 'default' value if it needs to be, provided the field isn't locked/disabled.

I don't know why Date() wouldn't work in your subform. Post your two code snippets (I assume they're nearly identical, but maybe something's funky)

David R
 

Users who are viewing this thread

Back
Top Bottom