Switchboard Manager

  • Thread starter Thread starter Gregc.
  • Start date Start date
G

Gregc.

Hi

I'm trying to set up a switchboard Manger, whereby a user clicks on a
button and it opens up a query. How do I go about making this happen.

Greg
 
Hi

I'm trying to set up a switchboard Manger, whereby a user clicks on a
button and it opens up a query. How do I go about making this happen.

Greg

The built in switchboard does not, in itself, support opening queries.
There are several work-around's.
Create a new module.
Insert the following Sub-procedure:

Public Sub OpenAQuery()
DoCmd.OpenQuery "QueryName"
End Sub

Open the Switchboard manager and add a new command to the switchboard
page. As the command, select Run Code.
Write
OpenAQuery
as the Function to be opened.

Save all the changes.
The switchboard will then run the code which will open the query.
 
You shouldn't be opening queries, you should be using forms if you want the
user to input data or reports if you want them to review data.

If you really insist on opening a query then use the RunMacro or RunCode
option and point to a macro or some code which carries out this action for
you.
 
Terry said:
You shouldn't be opening queries, you should be using forms if you want the
user to input data or reports if you want them to review data.

If you really insist on opening a query then use the RunMacro or RunCode
option and point to a macro or some code which carries out this action for
you.
I don want users to input data. I want them to use the existing
queries.

Greg
 
Gregc. said:
I don want users to input data. I want them to use the existing
queries.

Exactly how do you want them to "use" the existing queries?

Just opening a Query may give the users capability to edit or input data.
If you use the Query as the RecordSource of a Form, you can control whether
or not the user can edit; or use the Query as RecordSource of a Report, and
that guarantees the user can't edit.

Larry Linson
Microsoft Access MVP
 
They open it up, and dump the data into excel

Have you considered using the Query as the Source from which you export (or
use TransferSpreadsheet in code) to Excel? "Dump the data into" is not very
specific to me -- it may be much more so to you, with the database at hand.

Larry Linson
Microsoft Access MVP
 
Larry said:
Have you considered using the Query as the Source from which you export (or
use TransferSpreadsheet in code) to Excel? "Dump the data into" is not very
specific to me -- it may be much more so to you, with the database at hand.

Larry Linson
Microsoft Access MVP

Yep, here is my code thus far:

Function Export()
Dim excel As String
excel = "CONSOLIDATION_XTRACT_TOTAL"
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, excel,

"C:\Documents and Settings\GregoryCh\My Documents\Test.xls"


What I am trying to do is open it up in excel as a pivot table. Would
have any ideas on how to do this.

Greg
 
you could pivot the data in Access (there's an excellent wizard to help you
with this

Pieter

Gregc. said:
Yep, here is my code thus far:

Function Export()
Dim excel As String
excel = "CONSOLIDATION_XTRACT_TOTAL"
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, excel,

"C:\Documents and Settings\GregoryCh\My Documents\Test.xls"


What I am trying to do is open it up in excel as a pivot table. Would
have any ideas on how to do this.

Greg



--
 
I just made a report from my query and had the SWBM open that up. Works great
for me.
 

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

Switchboards within a switchboard 2
Access Switchboard error message 1
switchboard problem 4
I've lost my Switchboard ! 3
Switchboard Minimized 4
SWITCHBOARD 1
Controlling another switchboard 2
Switchboard in Access 2007 1

Back
Top