Adding Queries to the Switchboard Form

mds1124

New member
Local time
Yesterday, 20:22
Joined
Dec 6, 2009
Messages
2
:confused: Access 2007 - How do I add queries to the switchboard form???

Fairly new to Access, but I know this can be done...

Thanks In Advance...
 
look in handlebuttonclick event on the switchboard form

this will show the constant values for the command column in the switchboarditems table

1 = goto switchboard page
3 = open form etc

if there is an open query, this will be one of the options
if not, you can easily add code in here to make one
 
OK...In Access 2007, how do I get to the code behind the Switchboard Form???

Thanks In Advance...
 
You will need to create a module to run your query as there is no method to open a query directly from the switchboard.
 
A switchboard is essentially a crippled type of form.
Just make a form with buttons so you can run whatever code you want.
 
OK - this is trivial if you have an understanding of whats going on

All this in HandleButtonClick event

add a constannt at the top

Const conCmdOpenQuery = 9

in the case statement, add the following at a suitable point

Case conCmdOpenQuery
DoCmd.OpenQuery rst![Argument]


now, in your switchboard items table, just add options, with command value 9.

-------------
now I suspect the reason MS didint put it there, is because its unusual to want ot open a query directly. If its editable, you lose control of data entry, and it becomes dangerous. But its easy to do, as explained
 

Users who are viewing this thread

Back
Top Bottom