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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update Time

Status
Not open for further replies.

mercwonder007

IS-IT--Management
Aug 12, 2005
33
US
Hello Again,

I have a date/time field in a form and I want to have a control button that when I click on it it automatically updates the time to current time. I tried a requery macro and it didn't do a thing. I then tried a repainting macro and again it didn't do a thing. Any thoughts???
 
How are ya mercwonder007 . . . . .

I suspect it a calculated control so try [blue]Me.ReCalc[/blue]

Calvin.gif
See Ya! . . . . . .
 
Is this a macro function or VBA... If it is VBA I have no idea how to incorporate it.
 
mercwonder007 . . . . .

In the properties for the comand button, events tab, put the cursor on the [blue]Click Event[/blue] line, then click the three elipses
Elipses.BMP
just to the right. This is where it goes . . .

Calvin.gif
See Ya! . . . . . .
 
mercwonder007 . . . . .

Thats all I gave ya!

When its in, [blue]Alt + Q[/blue] to get back to design view.

Calvin.gif
See Ya! . . . . . .
 
I typed it in and went back to my form... pressed the button and nothing happened. Do I have to tell it what field to update?
 
Replace this:
Me.Recalc
By this:
Me![name of date/time 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
 
You guys are AWESOME... Thank you very much... That worked
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top