Results 1 to 5 of 5
  1. #1
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Niagara Falls, New York, USA
    Posts
    1,878
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Error: Invalid procedure call or argument (5)? (A2007 (12.0.6334.5000) SP1 Jet 4.0 SP-8 WinXp SP2)

    I have a Custom Menu Bar, when I select:

    Tools, Compact and Repair Databaseā€¦

    It runs:

    CommandBars("Menu Bar"). _
    Controls("Tools"). _
    Controls("Database Utilities"). _
    Controls("Compact and Repair Database..."). _
    AccDoDefaultAction

    Iā€™m getting the following error:

    Microsoft Office Access
    Error: Invalid procedure call or argument (5) OK

    This same code works OK for years with no messages on a2k thru a2k3 computers

    Any thoughts?

    Thanks, John

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Error: Invalid procedure call or argument (5)? (A2007 (12.0.6334.5000)

    I don't have Access 2007, but I'd think the error is because it has a ribbon instead of a menu bar.

  3. #3
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Niagara Falls, New York, USA
    Posts
    1,878
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Error: Invalid procedure call or argument (5)? (A2007 (12.0.6334.5000)

    I'm using Custom Menu Bar and running 2007 in what they call legacy mode which eliminates Ribbons and uses the Menu Bar File, Edit, View, Tools... as

    per http://office.microsoft.com/en-us/ac...365441033.aspx which I thank your for.

    All the other menu option seem OK

    John

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Error: Invalid procedure call or argument (5)? (A2007 (12.0.6334.5000)

    I hope that someone who has Access 2007 can help you.

  5. #5
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Niagara Falls, New York, USA
    Posts
    1,878
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Error: Invalid procedure call or argument (5)? (A2007 (12.0.6334.5000)

    Is there another way of doing the equivalent of the following in code?

    CommandBars("Menu Bar"). _
    Controls("Tools"). _
    Controls("Database Utilities"). _
    Controls("Compact and Repair Database..."). _
    AccDoDefaultAction

    Tbanks, John

Posting Permissions

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