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

Date Format error on form

Status
Not open for further replies.

eao

MIS
Nov 14, 2001
104
US
I have the following function on a form, that when run displays #name.This function does not appear to work at all in this particular database. If I create a new form in a new database, the formatting works properly. I didn't create this database, so I'm not sure what could be wrong with it.

Code:
=Format(Date(),"Long Date") & " " & Format(Time(),"Long Time")
 
In case you used some reserved word for some objects:
=Format(VBA.Date(),"Long Date") & " " & Format(VBA.Time(),"Long Time")
Or:
=Format(Now(),"Long Date") & " " & Format(Now(),"Long Time")

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Here are the results I get when I modify the expression:


The function you entered can't be used in this expression.

*You may have used a DoEvents, LBound, UBound, Spc, or Tab function in an expression.
*You may have used an SQL aggregate function, such as Count, in a design grid or in a calculated control or field.
 
Even the expression with Now() ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Just to know, where is this expression typed ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
In the Control Source field.
 
In the ControlSource of what ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
You may have to check the references:
when in VBE (Alt+F11) menu Tools -> References ...
Does the database compile properly ?
menu Debug -> Compile ...

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top