Results 1 to 2 of 2
  1. #1
    zhshqzyc is offline Novice
    Windows XP Access 2007
    Join Date
    Jan 2011
    Posts
    9

    Open a query


    Hi, suppose I have a button on a form. Now if I click the button, a query will be opened.

    I have never done this before. Need advice and sample code. Thanks.

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Look at

    DoCmd.OpenQuery

    though most of us never let users into tables or queries, just forms and reports.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. open a report using VBA from dynamic query?
    By haggisns in forum Programming
    Replies: 3
    Last Post: 10-15-2010, 08:45 AM
  2. Access change my query and then can't open it
    By weekend00 in forum Queries
    Replies: 3
    Last Post: 10-15-2010, 01:35 AM
  3. only prints the same query - no matter what i have open
    By RedGoneWILD in forum Programming
    Replies: 9
    Last Post: 08-31-2010, 10:47 AM
  4. Open Query from another database
    By thestappa in forum Programming
    Replies: 2
    Last Post: 07-23-2010, 08:45 AM
  5. Replies: 2
    Last Post: 02-26-2010, 08:14 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums