Results 1 to 5 of 5
  1. #1
    Join Date
    Sep 2005
    Posts
    313

    Unanswered: How to fix mid function

    I have a question:

    SELECT DateSerial(2000+mid([enter],3,2),Mid([enter],1,2),1) AS datevalue;

    it works in 2000 windows,
    but it doesn't works in XP windows.

    Why?
    The error message the function mid has a problem.

    How can I fix the problem in XP widows.

    Thanks.

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    mid is an intrinsic fucntion of VB/VBA - if it isn't present on your XP computer, then I'd suspect that a library or reference is missing. To fix this open a form in design mode
    view the code.
    from the code window select tools references and make sure that visual basic for applications is ticked.

    I'd scan through the list of references to see if any are missing

  3. #3
    Join Date
    Sep 2005
    Posts
    313
    I am saying in query, NOT VB.

    Thanks.

  4. #4
    Join Date
    May 2004
    Posts
    159
    VB is still used even in a query. I even have queries that call VB functions which is rather neat. A query is just a visual representation of an SQL statement. anyway he is right - you need to check your references and see what you are missing. It is possible the syntax needs to be checked- I had some 97 queries that needed updating in the string manipulation as Office 2003 and XP were more picky than the old 97 and WNT I had been using.


    Quote Originally Posted by accessman2
    I am saying in query, NOT VB.

    Thanks.

  5. #5
    Join Date
    Sep 2005
    Posts
    313
    I fixed that.
    Thanks a lot.

Posting Permissions

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