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

= Date() formula in VB

Status
Not open for further replies.
Jun 4, 2003
58
US
I have a command button on a form that time stamps the date in a field

Private Sub Command297_Click()
Me.Last_Updated_Date.Value = Date
End Sub

It works fine on my computer, but on someone elses it brings up an error as if it doesnt recognize the formula.

Is there any other way to use the "= Date()" function?

Thank you
 
It's probably a matter of missing references on the machine where it doesn't work. In the VBE check Tools | References on that machine, and I'm sure you'll find a reference that's marked as missing. Unceck it (ok), then check it again.

Here's a faq with some more information (and Microsoft links) faq705-2959

Another way to get the date, is using

[tt]int(now)[/tt]

Roy-Vidar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top