Switchboard error message

Access Discussion in 'Microsoft Office' started by Johnk320, Oct 12, 2017.

  1. Johnk320

    Johnk320

    Joined:
    Oct 12, 2017
    Likes Received:
    1
    (This is also posted on another Access forum)

    I have created three switchboards (created using Access 2013) for use with a database that previously worked as expected but now some of the choices are giving me the following error message: "An expression in argument 3 has an invalid value."

    I had these switchboards working in a test DB and, as they all were working as expected, exported them to the production DB. It is in the production DB that they are giving this message.

    The structure of the three switchboards is: switchboard1 is for administrators/Dept heads and consists of choices to launch the other two switchboards and choices only for admins. Switchboard 2 is for authorized office users and consists of choices pertaining only to their department. Finally, switchboard 3 is for the shipping/receiving department and, like the office users, contains only choices for those authorized in that department.

    The menu choices that are generating this message seem to be one of two types:

    1) Going to a different switchboard (a command "1" in the switchboard table leading to a correct switchboard #, item# 0, command# 0 in the table) OR

    2) Opening a form in either add or edit mode (command 2 or 3 in the switchboard table).

    I have visually traced all the switchboard numbers, item numbers and commands in the switchboard table and they all check out OK. I have checked the forms for proper record sources and they all check out OK.

    My questions is: where do I find this argument 3 the error message refers to so I can see what expression has the invalid value? I don't believe it is referring to the argument column in the related switchboard table.

    Any help is welcomed and appreciated....

    John

    (Hoping Jeff Conrad will be among those who reply as I'm using a book he wrote :))
     
    Johnk320, Oct 12, 2017
    #1
    1. Advertisements

  2. Johnk320

    Johnk320

    Joined:
    Oct 12, 2017
    Likes Received:
    1
    OK... I found the solution!

    It centers around a couple things. In my case, because I was using multiple switchboards within one database, I was forced to give them different names. The tables and forms need to be the same names (i.e. switchboard abc items (table name) and switchboard abc (form name). These need to be identical! Secondly, and this is where the error message (an expression in argument 3 has an invalid value) is generated... You need to open the affected form in design view, open the properties window, choose OptionLabel1, and click on the OnOpen Embedded Macro ellipsis to reveal the coding. This is the Macro coding for the switchboard commands (1, goto switchboard; 2, open form in add mode; 3, open form in edit mode, etc.). You'll find an OnError Macro first in the list, then an If statement referencing [command] = 1. There are two Set Properties for the Label 1 and Label 2 controls. It is within these statements my error was occurring. The commands that referenced the tables for the forms (switchboard abc items - referenced above - for the switchboard abc form) were referencing the incorrect switchboard name (following the above example, it referenced switchboard items instead of switchboard abc items)! I changed that to the correct switchboard name (switchboard abc items) and, voila! everything now works!

    Hope this helps others.....
     
    Johnk320, Oct 18, 2017 at 2:42 PM
    #2
    Ian likes this.
    1. Advertisements

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Similar Threads
  1. Enaxis

    Outlook Outlook Express Error Message

    Enaxis, Jun 6, 2005, in forum: Microsoft Office
    Replies:
    0
    Views:
    967
    Enaxis
    Jun 6, 2005
  2. leetay2

    Outlook POP3 Error message on Outlook - Help Please

    leetay2, Oct 1, 2005, in forum: Microsoft Office
    Replies:
    2
    Views:
    484
    leetay2
    Oct 1, 2005
  3. tellboy

    Word Word Error Message

    tellboy, Nov 21, 2005, in forum: Microsoft Office
    Replies:
    6
    Views:
    342
    itsme
    Nov 21, 2005
  4. sherrif

    Word Error message in Word 2003

    sherrif, Jan 3, 2006, in forum: Microsoft Office
    Replies:
    2
    Views:
    377
    sherrif
    Jan 3, 2006
  5. gpratt8

    Outlook Reply And Forward Error Message In Outlook

    gpratt8, Jul 1, 2008, in forum: Microsoft Office
    Replies:
    0
    Views:
    375
    gpratt8
    Jul 1, 2008
  6. lcrsrq

    Outlook Outlook 2002 Error Message

    lcrsrq, Oct 26, 2008, in forum: Microsoft Office
    Replies:
    1
    Views:
    285
    Koney
    Oct 26, 2008
  7. csh

    Excel Excel Error Message

    csh, Nov 16, 2008, in forum: Microsoft Office
    Replies:
    1
    Views:
    377
    netBooger
    Nov 16, 2008
  8. Brenda Allen

    Access Switchboard Question - MS Access 2010

    Brenda Allen, Feb 20, 2015, in forum: Microsoft Office
    Replies:
    0
    Views:
    581
    Brenda Allen
    Feb 20, 2015
Loading...