Results 1 to 8 of 8
  1. #1
    deadshot is offline Novice
    Windows 7 32bit Access 2013 32bit
    Join Date
    Jun 2017
    Posts
    4

    Migration: Access 2003 to Access 2013

    We currently are migrating our access(vba) projects from access 2003(win xp) to access 2013(win 7).
    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
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    DONT put command line variables in queries. Use forms to get variables for users to pick.
    a text box, or combo box.

    There's no need to convert the access dbs. All new versions of Access can read old databases. But you can.

  3. #3
    deadshot is offline Novice
    Windows 7 32bit Access 2013 32bit
    Join Date
    Jun 2017
    Posts
    4
    Thanks for the reply..

    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. if all new version can read old dbs. What could be the issue here

  4. #4
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    In later versions of Access, the syntax became, well, more strict(?)... In older versions of BASIC and VB, the dollar sign indicated a string. This syntax (with the $) *may* have been depreciated.

    Maybe try :
    Code:
    Select ....From... where columnABC = command()
    I did find these pages:
    https://support.office.com/en-us/art...A-479C020FFAA4
    https://msdn.microsoft.com/en-us/lib...(v=vs.60).aspx
    https://social.msdn.microsoft.com/Fo...orum=accessdev

  5. #5
    deadshot is offline Novice
    Windows 7 32bit Access 2013 32bit
    Join Date
    Jun 2017
    Posts
    4
    I tried with command() and command but the error pops up Undefined function in expression.
    Command is a member of VBA.interaction

  6. #6
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664


    Would need your dB for analysis....

  7. #7
    deadshot is offline Novice
    Windows 7 32bit Access 2013 32bit
    Join Date
    Jun 2017
    Posts
    4
    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
    Click image for larger version. 

Name:	refer.PNG 
Views:	12 
Size:	15.5 KB 
ID:	29192
    Need to find out what references to add / remove . Need a bit of help here.

  8. #8
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Don't know what references you need, but I have 4 references:
    - Visual Basic For Applications
    - Microsoft Access 14.0 Object Library
    - Microsoft Visual Basic For Applications Extensibility 5.3
    -Microsoft Office 14.0 Access database Engine Object Library

    Again, I would need your converted dB and the command line command to be able to do more troubleshooting...

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 13
    Last Post: 12-03-2015, 01:58 PM
  2. Replies: 2
    Last Post: 04-07-2014, 10:01 AM
  3. Replies: 2
    Last Post: 06-19-2013, 09:08 AM
  4. Migration from Access 2003 database to Access 2007 database.
    By cyclus2 in forum Import/Export Data
    Replies: 1
    Last Post: 09-10-2010, 11:43 AM
  5. Replies: 0
    Last Post: 04-16-2009, 01:44 AM

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
  •  
Other Forums: Microsoft Office Forums