Access 2007 Switchboard buttons stop working

D

Dean Slindee

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's 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
 
K

KARL DEWEY

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 said:
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's 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


.
 
D

Dean Slindee

I am fairly convinced that it is an internal Access 2007 bug. It's
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).

KARL DEWEY said:
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 said:
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's 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


.
 
P

Pat ONeil

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 200
Access data project (.adp) run in development mode in all tests. SQL Serve
2005 back-end database
Trusted locations set up for all tests. The trusted location is the folde
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 men
navigation. The buttons on the main switchboard form are used to launc
forms, stored procedures, macros, and other child switchboard forms. Th
switchboard navigation buttons are behaving differently when run from Acces
2007 versus Access 2003

In Access 2007, after clicking a button that executes a stored procedure (o
a macro that executes a stored procedure), the buttons on the mai
switchboard that launch child switchboard forms all fail to respond. The
can be clicked, but nothing happens (similar to no event firing, but th
event *is* reached). Buttons that launch a form (or the button tha
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 fro
WindowsXP/Office2003, the application's switchboard buttons all functio
properly all the time. So, it is not an OS problem

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

Ask a Question

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. After that, you can post your question and our members will help you out.

Ask a Question

Top