From: Pat on
Select Case rst!Command
'go to another switchboard.
Case conCmdGotoSwitchboard
Me.Filter = "[ItemNumber] = 0 AND [SwitchboardID]=" &
rst!Argument

Me.FilterOn = True



Dean Slindee wrote:

Access 2007 Switchboard buttons stop working
06-Dec-09

Environments tested: Windows7, WindowsXP, Access 2007, Access 2003
Access data project (.adp) run in development mode in all tests. SQL Server
2005 back-end database.
Trusted locations set up for all tests. The trusted location is the folder
where the .adp resides, sub-folders included.
Default file format: Access 2002-2003.

I have a .adp application with a standard switchboard form as the main menu
navigation. The buttons on the main switchboard form are used to launch
forms, stored procedures, macros, and other child switchboard forms. The
switchboard navigation buttons are behaving differently when run from Access
2007 versus Access 2003.

In Access 2007, after clicking a button that executes a stored procedure (or
a macro that executes a stored procedure), the buttons on the main
switchboard that launch child switchboard forms all fail to respond. They
can be clicked, but nothing happens (similar to no event firing, but the
event *is* reached). Buttons that launch a form (or the button that
launched the stored procedure) still function.

The tests have been run in Windows7/Office 2007 and WindowsXP/Office2007.
Both exhibit the same problem. However, when running the .adp from
WindowsXP/Office2003, the application's switchboard buttons all function
properly all the time. So, it is not an OS problem.

I have stepped thru the code in the switchboard form. The Me.Filter
statement in the code below is reached with the proper argument values,
stepped thru, but Me.Filter no longer displays the child switchboard form in
Access 2007. The behavior is like Me.Filter has been disabled.
Private Function HandleButtonClick(intBtn As Integer)
Select Case rst!Command
'go to another switchboard.
Case conCmdGotoSwitchboard
Me.Filter = "[ItemNumber] = 0 AND [SwitchboardID]=" &
rst!Argument
..
End Select

The .adp must be closed/restarted, in order to get the failing switchboard
buttons to function again. I can compile the .adp to an .ade, but it works
the same as the .adp. If you do not click a switchboard button that
launches a stored procedure, all the buttons remain functioning as normal.

This resembles a security problem with Access 2007, in that, in order to
display a child switchboard, a data set must be returned from
tblAdminSwitchboard and the rows displayed on the child switchboard form.

Anyone got any ideas?
Dean Slindee

Previous Posts In This Thread:

On Sunday, December 06, 2009 11:12 AM
Dean Slindee wrote:

Access 2007 Switchboard buttons stop working
Environments tested: Windows7, WindowsXP, Access 2007, Access 2003
Access data project (.adp) run in development mode in all tests. SQL Server
2005 back-end database.
Trusted locations set up for all tests. The trusted location is the folder
where the .adp resides, sub-folders included.
Default file format: Access 2002-2003.

I have a .adp application with a standard switchboard form as the main menu
navigation. The buttons on the main switchboard form are used to launch
forms, stored procedures, macros, and other child switchboard forms. The
switchboard navigation buttons are behaving differently when run from Access
2007 versus Access 2003.

In Access 2007, after clicking a button that executes a stored procedure (or
a macro that executes a stored procedure), the buttons on the main
switchboard that launch child switchboard forms all fail to respond. They
can be clicked, but nothing happens (similar to no event firing, but the
event *is* reached). Buttons that launch a form (or the button that
launched the stored procedure) still function.

The tests have been run in Windows7/Office 2007 and WindowsXP/Office2007.
Both exhibit the same problem. However, when running the .adp from
WindowsXP/Office2003, the application's switchboard buttons all function
properly all the time. So, it is not an OS problem.

I have stepped thru the code in the switchboard form. The Me.Filter
statement in the code below is reached with the proper argument values,
stepped thru, but Me.Filter no longer displays the child switchboard form in
Access 2007. The behavior is like Me.Filter has been disabled.
Private Function HandleButtonClick(intBtn As Integer)
Select Case rst!Command
'go to another switchboard.
Case conCmdGotoSwitchboard
Me.Filter = "[ItemNumber] = 0 AND [SwitchboardID]=" &
rst!Argument
..
End Select

The .adp must be closed/restarted, in order to get the failing switchboard
buttons to function again. I can compile the .adp to an .ade, but it works
the same as the .adp. If you do not click a switchboard button that
launches a stored procedure, all the buttons remain functioning as normal.

This resembles a security problem with Access 2007, in that, in order to
display a child switchboard, a data set must be returned from
tblAdminSwitchboard and the rows displayed on the child switchboard form.

Anyone got any ideas?
Dean Slindee

On Tuesday, December 08, 2009 11:54 AM
KARL DEWEY wrote:

I have a similiar problem when I open a table from the switchbord I can
I have a similiar problem when I open a table from the switchbord I can not
return to the main switchboard but can open other tables. If I go to the
table edit menu page and not open a table I can return.

I am using Access 2007 and Vista.

Here are the parts of my switchboard cose that I think are relevant.

' Constants for the commands that can be executed.
Const conCmdGotoSwitchboard = 1
Const conCmdOpenFormAdd = 2
Const conCmdOpenFormBrowse = 3
Const conCmdOpenReport = 4
Const conCmdCustomizeSwitchboard = 5
Const conCmdExitApplication = 6
Const conCmdRunMacro = 7
Const conCmdRunCode = 8
Const conCmdOpentableEdit = 9
Const conCmdOpenFormView = 10
Const conCmdOpenFormData = 11

' An error that is special cased.
---------
' Find the item in the Switchboard Items table
' that corresponds to the button that was clicked.
Set dbs = CurrentDb()
Set rst = dbs.OpenRecordset("Switchboard Items", dbOpenDynaset)
rst.FindFirst "[SwitchboardID]=" & Me![SwitchboardID] & " AND
[ItemNumber]=" & intBtn
--------
' Open a table.
Case conCmdOpentableEdit
DoCmd.OpenTable rst![Argument], acViewNormal

--
Build a little, test a little.


"Dean Slindee" wrote:

On Tuesday, December 08, 2009 9:33 PM
Dean Slindee wrote:

I am fairly convinced that it is an internal Access 2007 bug.
I am fairly convinced that it is an internal Access 2007 bug. it is
happening in at least 4 .adp projects at my site. The common problem occurs
after using a switchboard button to open a table in grid view, or using a
stored procedure to open a dataset in grid view.

Access 2007 is riddled with bugs. See my adjoining post on Navigation panes
not being able to be hidden. I have many more odd incompatibilities
between Access 2007 and Access 2003, but just have to live with them and
wait for a service pack.

I suspect that .adp projects are more prone to these odd behaviors, perhaps
because the Access development team did not test .adp's well (if at all).


Submitted via EggHeadCafe - Software Developer Portal of Choice
BizTalk: Incorporating conditional If / Else Functoid Logic in a map.
http://www.eggheadcafe.com/tutorials/aspnet/f6fc20ab-5c6a-4f04-8a0b-bba39e4bbcf0/biztalk-incorporating-co.aspx