Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Switchboard Manager

Discussion in 'Information Technology' started by Gregc., Jul 28, 2006.

  1. Gregc.

    Gregc.
    Expand Collapse
    Guest

    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
     
  2. Loading...

    Similar Threads Forum Date
    Sikh Coalition Federal Government Charges that Sikh Coalition Client Harassed by Managers and Customers, Barred Fro Sikh Organisations Sep 30, 2010
    Manager's radio remarks spark storm of outrage Hard Talk Sep 23, 2007

  3. fredg

    fredg
    Expand Collapse
    Guest

    On 16 Jul 2006 16:56:34 -0700, Gregc. wrote:

    > 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.
    --
    Fred
    Please respond only to this newsgroup.
    I do not reply to personal e-mail
     
  4. Terry Kreft

    Terry Kreft
    Expand Collapse
    Guest

    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 Kreft


    "Gregc." <gregchilton@bigpond.com> wrote in message
    news:1153094194.569132.120480@s13g2000cwa.googlegroups.com...
    > 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
    >
     
  5. Gregc.

    Gregc.
    Expand Collapse
    Guest

    Terry Kreft wrote:
    > 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 Kreft

    I don want users to input data. I want them to use the existing
    queries.

    Greg
     
  6. Larry Linson

    Larry Linson
    Expand Collapse
    Guest

    "Gregc." <gregchilton@bigpond.com> wrote

    > 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
     
  7. Gregc.

    Gregc.
    Expand Collapse
    Guest

    Larry Linson wrote:

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

    They open it up, and dump the data into excel
     
  8. Larry Linson

    Larry Linson
    Expand Collapse
    Guest

    "Gregc." wrote

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

    > 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
     
  9. Gregc.

    Gregc.
    Expand Collapse
    Guest

    Larry Linson wrote:
    > 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
     
  10. Pieter Wijnen

    Pieter Wijnen
    Expand Collapse
    Guest

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

    Pieter

    "Gregc." <gregchilton@bigpond.com> wrote in message
    news:1153210131.261215.4290@m73g2000cwd.googlegroups.com...
    >
    > Larry Linson wrote:
    >> 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
    >




    --
    ----------------------------------------
    I am using the free version of SPAMfighter for private users.
    It has removed 4282 spam emails to date.
    Paying users do not have this message in their emails.
    Get the free SPAMfighter here: http://www.spamfighter.com/len
     

Share This Page