Hi
I am creating a Switchboard and I want to link to a Querie. Is that not
possible ??
Thanks
Karen Jenny
Three ways to do this.
It's not set up to run a query directly, but it will run a macro or
code from a module.
1) Make a new macro set to run whatever query you want.
Set it to View Datasheet.
Then edit the Switchboard using the Switchboard Manager and click on
Run Macro.
Enter the Macro Name where indicated.
2) If you would rather use code, make a new module.
Sub RunQuery()
DoCmd.OpenQuery "QueryName"
End Sub
Now edit the switchboard, using the switchboard manger, this time use
Run Code, naming the function as RunQuery.
3) By adding some code to the Code sheet:
Open the Switchboard Code window.
Add to the existing list of constants:
Const conCmdOpenQuery = 9
Add to the list of Select Case statements:
Case conCmdOpenQuery
DoCmd.OpenQuery rst![Argument]
Exit and then using the Swiychboard Manager, add ANY FORM to the menu.
Open the Switchboard Items table and change that entry to:
Item Text Command Argument
What the button does 9 TheQueryName
That should do it. Cumbersome, I know, but I didn't design it.