Consulting

Results 1 to 6 of 6

Thread: Migration: Access 2003 to Access 2013

  1. #1
    VBAX Newbie
    Joined
    Jun 2017
    Posts
    3
    Location

    Migration: Access 2003 to Access 2013

    We currently are migrating our access(vba) projects from access 2003(win xp) to access 2013(win 7).
    Our db's are scheduled to run at various times. From the auto launch tool, command line variables are passed to the db's for the particular run.
    There is no requirement for user's to pick the variables.
    When i am running a access db, where in there is a call to a access query in the vba module. There is a error popping up
    Error: undefined function command$ in expression......
    In the query there is check in the where condition with the command line args passed i.e. Select ....From... where columnABC = command$()

    This was working fine in access 2003. I am not able to find any resources for this issue.
    If any further information is required let me know. Can anyone help me out.

    Thanks

  2. #2
    VBAX Expert
    Joined
    Oct 2012
    Posts
    726
    Location
    Access has't changed that much over the years except to add useless features nobody wants/needs.

    command should give the command line args passed in.

    "Select ....From... where columnABC = '" & command & "'"

    https://msdn.microsoft.com/en-us/lib...ffice.11).aspx

  3. #3
    VBAX Newbie
    Joined
    Jun 2017
    Posts
    3
    Location
    Jonh Used the syntax as mentioned, but no luck. query executes but no result. As the command itself is passed as string value not the command line args.

  4. #4
    VBAX Guru
    Joined
    Mar 2005
    Posts
    3,296
    Location
    Can I ask how many variations of the Args you have for the query?
    The reason being the MS example uses the Command Args to open different forms, therefore you should be able to use it to open queries with preset Parameters.
    I know it doesn't answer your question but it could be a work around.

  5. #5
    VBAX Expert
    Joined
    Oct 2012
    Posts
    726
    Location
    Quote Originally Posted by DeadShot View Post
    As the command itself is passed as string value not the command line args.
    I don't know what you are saying there.
    You probably need to post the code.
    Also, what is an 'auto launch tool'? Windows Scheduler?

    Command will be a vba function not Jet/ACE. Maybe a Replace() function has gone walkabout?

  6. #6
    VBAX Newbie
    Joined
    Jun 2017
    Posts
    3
    Location
    Thanks jonh for your reply
    After doing a bit of analysis and google search found out this could be a issue with references used. There are no missing references.
    Screenshot attached for the references used
    Attachment 29192
    Need to find out what references to add / remove . Need a bit of help here.

Tags for this Thread

Posting Permissions

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