Results 1 to 4 of 4
  1. #1
    New Lounger
    Join Date
    May 2002
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    VBA Format Function (Access 97/SR-1, SR-2)

    Does Access 97 SR-1 not recognize the VBA Format function?

    I'm running Access 97 SR-2 and working on a database for a client who has Access 97 SR-1.

    I have a module that includes the statement:
    strNewName = "tblJobs" & Format(dtmMonth, "yyyy") _
    & "_" & Format(dtmMonth, "mm")
    in which strNewName is dimensioned as a string variable and dtmMonth as a date.
    The result is concatenated as part of a string that is used to name a table copied from the current database to another (archive) database.

    When I run the module in SR-2, it works fine.
    When I run it in SR-1, the code hangs at the word Format and I get an error message: Can't find project or library.
    I don't really understand the Help page for "Can't find ...," but it doesn't seem to say anything that relates to my code.

    I tried eliminating the quotation marks around "yyyy," and I got an undefined variable error (which makes sense).

    In place of the subject statement, I substituted:
    strNewName = "tblJobs" & dtmMonth
    and it worked fine (the value of strNewName became "tblJobs" and the appropriate date -- but of course in the wrong format).

    Can anyone help?

  2. #2
    4 Star Lounger
    Join Date
    Dec 2000
    Location
    London, Ontario, Canada
    Posts
    437
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: VBA Format Function (Access 97/SR-1, SR-2)

    You want to check for Missing References on the SR1 installation.

  3. #3
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: VBA Format Function (Access 97/SR-1, SR-2)

    In any module, click on Tools, References and look for a missing reference. Uncheck it and close the reference window

    Francois
    Francois

  4. #4
    New Lounger
    Join Date
    May 2002
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: VBA Format Function (Access 97/SR-1, SR-2)

    Thank you both -- that took care of the problem. I have an add-in -- EZYDocumenter -- that's not on my client's system, and Access just didn't know what to do about that.

Posting Permissions

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