Link to home
Start Free TrialLog in
Avatar of Paul Cahoon
Paul Cahoon

asked on

Access 2007 Switchboard Error 2950

I have an Access 2007 db and I am trying to set it up to open the switchboard with the db.  I have set this up in the current db options but every time I open the db, I get 'capture1' below.  When I click OK, get 'capture2' below.  Once I click on 'Stop All Macros' the db opens fine and I am able to open the Switchboard manually but I need to be able to run it automatically so I can use this in a runtime environment.  Any suggestions?
Capture1.JPG
Capture2.JPG
Avatar of vohalloran
vohalloran
Flag of United States of America image

To select a startup form, click the Office Buttton, choose Access Options (at the bottom, to the right) and select Current Database (second item from top).  Using the drop down list button for the combobox next to "Display Form:", select the name of the form you want to open.
If you want this macro to run, see Microsoft's solution to this problem at http://support.microsoft.com/kb/931407.  It seems as if it is a "trust" issue.
Avatar of Paul Cahoon
Paul Cahoon

ASKER

I've already looked at that and my db is in a trusted location.
I even went into the trust center and enabled all macros (regardless of whether it is a trusted folder) to see if that would make any difference.  Same thing.
Did you create this macro?
'To select a startup form, click the Office Buttton, choose Access Options (at the bottom, to the right) and select Current Database (second item from top).  Using the drop down list button for the combobox next to "Display Form:", select the name of the form you want to open.'

That is all I did.
Is there a Label1 on your switchboard?  If not, did you rename Label1?  If you did, you may have to also rename it in the embedded macro (or changed its name back to Label1).
I tried to recreate this problem in Access and my switchboard works fine as the startup form.
The Switchboard : Form : On Open macro has the following steps:
Action                                     Arguments
SetTempVar                         SwitchboardID, DLookUp("SwitchboardID","Switchboard Items","[ItemNumber] = 0 AND [Argument] = 'Default'")
SetProperty                           Label1, Caption, =DLookup("ItemText", "Switchboard Items", "[SwitchboardID]=" &TempVars("SwitchboardID"))
SetProperty                           Label2, Caption, =DLookUp("ItemText","Switchboard Items","[SwitchboardID] = " & TempVars("SwitchboardID"))
Requery
It sounds like the OnOpen event is trying to fire before the form or the label is created.  Compare the macro in your switchboard to the code above, check to make sure you haven't changed the name of the label and if all else fails, I would try creating a new switchboard and see if that one works.
Here is where I am at.  I kind of stumbled upon this.  I upgraded to a larger HD in my laptop last weekend and have been getting everything set back up (which is why I have been out of the loop on this).  After I installed my Office 2007 and tried to open the db (located in My Documents) I get the same two message listed in the original post here.  But, since this is a new installation, My Documents is not a trusted location so I have to manually enable the content.  As soon as I enable it, the switchboard comes up.  If I add the location as a trusted location, I still get the messages, but the switchboard never comes up.

Not sure if this sheds any light on what might be happening but I figured I would share it.  I did get this to open in Access Runtime without any issues, I just don't understand why it will not work correctly on my machine.
ASKER CERTIFIED SOLUTION
Avatar of vohalloran
vohalloran
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I am closing this question out and awarding points even though I have not figured out what is causing this problem.  I am awarding points in thanks for at least making an effort to help.  I have just decided that the problem is not big enough for me to spend any more time on.  I can work around it.  Thanks.