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!

"Format" function not working in VBA

Status
Not open for further replies.

LeanneGodney

Technical User
Mar 7, 2002
175
GB
Hi Guys, does anyone know if there's a specific Reference or something that you need in order for "Format" to work in VBA? When I try format([thedate],"ddd, d mmmm yyyy") it gives me an error and highlights the word Format. It works on my own PC, but not on another PC.

Please help??
 
You're probably missing a needed dll reference. On the PC that doesn't work, bring of the VB code window and go to Tools --> references on the menu. Access will have the word "missing" next to any references that are needed.

Probably the easiest way to fix would be to copy and register the dll from the PC that works. (But be careful if the PCs are running different operating systems) Maq B-)
<insert witty signature here>
 
Thanks Maq.... I'd already fixed it! Stupid thing is that there WAS a missing library, but the database didn't need it anyway. So when I unchecked it, everything worked! Really silly, but hey.. it's fixed! Thanks for your time.
Leanne
 
Try following for display long format date:
format([thedate],&quot;Long Date&quot;)
or
format([thedate],&quot;dddddd&quot;)

Aivars
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top