Auto Populating a txt box.

KeithB14

Registered User.
Local time
Today, 08:41
Joined
Feb 15, 2007
Messages
10
Good morning,

I have two txt boxes tied to a table in a form. txtSecMgrName and txtSecMgrDate. I would like to populate txtSecMgrDate with today's date when txtSecMgrName is filled in. I have tried inserting the following code into the "On Lost Focus". =IIf([txtSecMgrDate]=Not Null,[txtSecMgrDate]=Date()). Nothing happens. Can someone point me in the right direction.

Thanks for the help,

Keith
 
Use the after update event with the below code

me.txtSecMgrDate=Date()
 
That did the trick. I was making that too difficult. Thanks for the help.

Keith
 
And just for future reference, in VBA the correct syntax for

[txtSecMgrDate]=Not Null

would be

Not IsNull([txtSecMgrDate])
 

Users who are viewing this thread

Back
Top Bottom