Solved Switchboard Error 2001 (1 Viewer)

mib1019

Member
Local time
Today, 12:13
Joined
Jun 19, 2020
Messages
88
This is probably an easy fix, but I haven't been able to find it. Thanks in advance for your help in getting this pesky problem resolved.

I have used the Switchboard Manager to create my Switchboard for new database.

On opening the database from the Access File menu, I get the 2001 error, coming from the embedded macro behind the form.
Action Name: SetTempVar;
Arguments: SwitchboardID, DLookUp("SwitchboardID","Switchboard Items","[ItemNumber] = 0 AND [Argument] = 'Default'")

Interestingly, if I right click on the Access icon on my taskbar and open the db from the Recent list, the error doesn't happen; nor does it occur when opening the db via a shortcut on my desktop. Also, opening the file from Windows Explorer does not produce the error.

Only when I open the file from the Access File menu.

Your thoughts?
MIB1019
 

June7

AWF VIP
Local time
Today, 10:13
Joined
Mar 9, 2014
Messages
5,470
There is reason MS deprecated the Switchboard Manager.

I don't like and never used it. I prefer VBA - it is easier to debug.

If you want to provide db for analysis, follow instructions at bottom of my post.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 11:13
Joined
Oct 29, 2018
Messages
21,473
Hi. Welcome to AWF!

What is the error message for error number 2001?
 

mib1019

Member
Local time
Today, 12:13
Joined
Jun 19, 2020
Messages
88
Hi. Welcome to AWF!

What is the error message for error number 2001?
Hi. Welcome to AWF!

What is the error message for error number 2001?


I get this Macro Error Box

Switchboard Error.PNG
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 02:13
Joined
May 7, 2009
Messages
19,242
check if table Switchboard Items exists on your db.
if you renamed it, use the new table name in the macro.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 14:13
Joined
Feb 19, 2002
Messages
43,274
I never liked the embedded macros version of the Switchboard so the one I use is based on an older version of Access when everything was in VBA. This switchboard has some modifications, including allowing 12 items rather than the original 8. However, the downside is that although the form has been updated, I have no way to update the wizard because that is Access code so you have to update the Switchboard Items table manually if you use this version.

The app I've attached shows a Switchboard that I built myself. It is based on Switchboard Items table and includes security features. However, a version of the standard Switchboard is also included. It is item 5 (I think) on the menu. The sample app includes a login form because that is required for use with my custom switchboard. The sample of the old Switchboard had a funny exit button because the real one will close the app rather than go back to the main switchboard.
 

Attachments

  • SwitchboardForm20191125.zip
    1.4 MB · Views: 164

mib1019

Member
Local time
Today, 12:13
Joined
Jun 19, 2020
Messages
88
I had Access translate the embedded macros to VBA and it got worse, but may be more helpful in debugging. Here is the Switchboard Items Table

Switchboard Items Switchboard Items

SwitchboardIDItemNumberItemTextCommandArgument
1​
0​
Main Menu
Default
1​
1​
Companies List
3​
Company List
1​
2​
Company Detail Form
3​
Company Details
1​
3​
Quick Journal Add(s)
2​
Journal Quick Add Form
1​
4​
View Journal
3​
Journal
1​
5​
Timeshare Termination Team
1​
2
1​
6​
Do Maintenance
1​
3
1​
7​
Exit Access
6​
2​
0​
Timeshare Termination Team Menu
0​
2​
1​
Back to Main Menu
1​
1
2​
2​
TTT Media Companies
3​
TTT Media Companies
2​
3​
Add New Insertion Order
2​
Insertion Orders
2​
4​
All Insertion Orders
3​
Insertion Orders
2​
5​
View Account Executives
4​
Station Account Executives
2​
6​
Insertion Orders Summary Report
4​
Insertion Orders Summary Report
3​
0​
Maintenance Menu
0​
3​
1​
Back to Main Menu
1​
1
3​
2​
Categories & Subcategories
3​
Categories
3​
3​
Journal Task Lookup
3​
Task Lookup
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 02:13
Joined
May 7, 2009
Messages
19,242
it look normal to me.
have you tried editing the Switchboard in Design view and saving it again.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 14:13
Joined
Feb 19, 2002
Messages
43,274
You can simply substitute MY version of Switchboard for YOUR version of Switchboard. Just rename yours first before you import from my sample database. You will also have to remove the extraneous button I had to create so I could make the switchboard work like a plain ol' form.

There is no need to even touch your Switchboard Items table. Just don't import mine if you want to keep yours.

I don't see anything wrong with your table either.
 

mib1019

Member
Local time
Today, 12:13
Joined
Jun 19, 2020
Messages
88
Thanks everyone. Pat, your switchboard worked for me, but I have opted for creating my own Dashboard form and it's working great.

MIB1019
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 14:13
Joined
Feb 19, 2002
Messages
43,274
That's fine. The sample db also includes a custom menu that works similarly to Switchboard except it uses a subform so the pages don't have to be fixed length.
 

Users who are viewing this thread

Top Bottom