Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Auto Fill textbox

Status
Not open for further replies.

cbearden

Technical User
May 17, 2004
80
US
I have a Form with a subform.
The subform is linked to the form by strD#

The subform has these fields:
strD#
strName
strContact
strPhone
strFax
strUpdate

If someone makes a change to the record(minus strUpdate) in the subform, a textbox, strUpdate, needs to be filled with the current date (ex: 6/28/2005)

The code that I have is:
txtUpdate = Date()
I put this in the AfterUpdate for all the textboxes except strUpdate.

Could someone help.
Thanks
 
Why not simply this, in the BeforeUpdate event procedure of the subform:
Me![name of Update control] = Now()

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
The information is on Dealerships. The reason for this update box is so that the person looking at the information won't have to call to verify it everytime. If I have a date on the form, and see its 6 months old, then I might call to verify, otherwise, I'd save time by not calling.
 
Hi, cbearden,

I'm not sure I understand your response to PHV. Sounds like you think his solution won't work for you. But... I think it will. Sorry if I am mis-reading your post.

Ken S.
 
oops. that post was supposed to go to another forum.
sorry.
 
I put that code in but it still does the same thing that the code I had...It puts the date on every record of the subform. Plus the code added the time to the date.
 
I see what the problem was, thanks for the help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top