How do I put Queries on my Switchboard in Access ?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

I am creating a Switchboard and I want to link to a Querie. Is that not
possible ??

Thanks

Karen Jenny
 
Karen:

You can have the Switchboard run a macro and then define a macro to open a
query.

--
David Lloyd
MCSD .NET
http://LemingtonConsulting.com

This response is supplied "as is" without any representations or warranties.


Hi

I am creating a Switchboard and I want to link to a Querie. Is that not
possible ??

Thanks

Karen Jenny
 
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.
 

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

Similar Threads

Access Switchboard error message 1
Switchboard 9
Switchboard question 3
switchboard problem 4
SWITCHBOARD 1
Switchboard in Access 2007 1
Building a "branching" switchboard 2
Switchboard pages 5

Back
Top