Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Format function yields "Undefined function 'format' in expression error"

Posted on 2003-12-02
13
Medium Priority
?
1,183 Views
Last Modified: 2008-02-26

Can anyone help with this somewhat basic question.  Im reading a book about vba for access 2000.  When i try one of their examples, it get a "Undefined function 'format' in expression error".

Here are the specifics:

I am trying to get the month name out of a date in a query.  In the field box, i have: MonthName: Format([DateOrdered], "mmmm").  Seems pretty simple to me, any ideas?  

0
Comment
Question by:elbarro
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
13 Comments
 
LVL 10

Expert Comment

by:ADSaunders
ID: 9859562
Hi elbarro,
Have you got ALL of Access installed .. Including the scripting support?

Regards .. Alan
0
 
LVL 32

Expert Comment

by:jadedata
ID: 9859645
Hey elbarro!

  Check the menu Tools/References in the VBA Editor window.
  Make sure ALL the required references are check and that NONE show to be "Missing"

regards
Jack
0
 
LVL 5

Expert Comment

by:morpheus30
ID: 9860076
Have you tried:

MonthName(Month([DateOrdered]))
0
Fill in the form and get your FREE NFR key NOW!

Veeam® is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

 

Author Comment

by:elbarro
ID: 9870587
hey morpheus, you know any reason why what you mentioned worked and the other function didnt?
0
 
LVL 5

Expert Comment

by:morpheus30
ID: 9870719
Now that's baffling.  I know weird stuff happens when a person upgrades from an old version of Access (say Access 97) to a new one (say Access 2000).  Only thing I can think of is maybe the references are incorrectly set.  Following jadedata's instructions above, you should see these references for Access 2000 CHECKED.  If you don't then there is your problem:

Visual Basic for Applications
Microsoft Access 9.0 Object Library
0
 

Author Comment

by:elbarro
ID: 9870744
Are the "references" application wide or mdb wide.  What i mean by this is, if i change them in one mdb, does it mean its changed in all?  or does it only apply to that particular db.

Thanks, Greg
0
 
LVL 5

Expert Comment

by:morpheus30
ID: 9870748
It's changed for all...
0
 

Author Comment

by:elbarro
ID: 9870831
Heh, i dont see Access 9.0 Object library, but there are like 8 VBA dll's... any suggestions
0
 

Author Comment

by:elbarro
ID: 9870841
I guess, im trying to learn from this so that I can figure it out later on.  It seems as if the "Format" command is located in one of these dll's.  However, that particular dll either isnt on my system or isnt loaded.  Am I getting warm?
0
 
LVL 5

Expert Comment

by:morpheus30
ID: 9870877
OK, now we have something!  You don't have Microsoft Access 9.0 Object Library, but maybe you do have Microsoft Access 8.0 Object Library.  That's why you were able to use one function and not the other.

Did you upgrade to 2000 from 97?

0
 

Author Comment

by:elbarro
ID: 9870912
Here's my scoop.  Im using Access XP and reading a book on Access 2000 before I read the next one on advanced Access.  I have never dealt with VB and find it rather unconventional.  Without me getting into too much detail, the upgrade was from the books 2k db to my XP Access.  Im getting a couple other errors from time to time as well with this DB.

Thanks for all your help.
0
 
LVL 5

Accepted Solution

by:
morpheus30 earned 1400 total points
ID: 9870979
I see...

If you can do a fresh install of either program (not an upgrade) then this might solve your problems.  By the way, did you try looking for Microsoft Access 10.0 Object Library?  This is the library for Access XP.  You might find that it's there, but because it is UNCHECKED, you'll have to scroll down the window to find it (they are listed alphabetically).  Once you do, all you have to do is check the checkbox and it's ready...


0
 

Author Comment

by:elbarro
ID: 9871020
Thanks for all of your help.  You've answered my question and more.  I've posted another question if your interested under Question Title: how to swap info on reports, but i didnt want to bog down this thread.

Thanks again

Greg
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question