Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Nov 2003
    Location
    London, Gtr London, England
    Posts
    222
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Microsoft Query (2003(11.8012.8036)sp2)

    Hi there!

    I have an annoying problem re the above. I have an ODBC link into a secured Access database that works ok. I set up a link to a query within the DB for user so he can pull back online data and pivot to his hearts content. I have just added a further field that groups quarterly information into Jan-Mar, Apr-Jun etc and as an additional request split out the months for the latest qtr, rather than display them as a qtr. The means for doing this in Access, was to use the MonthName built in function which works absolutely fine in Access (i.e. displays Oct 2006, Nov 2006), but has now caused a problem with Excel's Microsoft Query in that it displays "Undefined function 'MonthName' in expression. and when you click ok dumps you back at Excel or if you are trying to set up a new query, back at Excel's Query Wizards screen.

    Has anyone else come across this? If so is there a fix? I've tried querying the original query in Access, but get the same problem.

    Cheers,

    Niven

  2. #2
    3 Star Lounger
    Join Date
    Nov 2003
    Location
    London, Gtr London, England
    Posts
    222
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Microsoft Query (2003(11.8012.8036)sp2)

    Aha! that explains it.

    Doh! In my frustration I forgot about the format function.

    Cheers,

    Niven

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Microsoft Query (2003(11.8012.8036)sp2)

    The ODBC driver doesn't 'know' the MonthName function, which is a relatively new addition to VBA.

    You can use Format([DateField],"mmmm") in the Access query. The Format function shouldn't cause a problem.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •