Results 1 to 2 of 2
  1. #1
    Katherine is offline Novice
    Windows Vista Access 2007
    Join Date
    Aug 2011
    Posts
    1

    Running a query or table in a form

    When running a query or a macro to open a table in a form (through a command button), it opens the query/table but sometimes when you click the cross to close the window it closes the form and not the query/table. Even though the query/table is brought up the tab at the top of the query/table is not bold and highlighted. It doesn't do it every time but usually when you try to run a query/table for the first time. How do I get the query/table tab to be selected so when I close the window it closes the query/table and returns back to the form?



    Would I need to convert the macro into VB code and add something into the code so it stops doing this?

  2. #2
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    if you're using the docmd.opentable or docmd.openquery commands it's going to open a separate window. If you've got a list box or subform etc that's based on your query you can just refresh the results and not have to worry about this closing problem

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

Similar Threads

  1. Replies: 2
    Last Post: 05-19-2011, 04:53 PM
  2. running select query in form delete event
    By suki360 in forum Programming
    Replies: 0
    Last Post: 03-11-2011, 10:11 AM
  3. Replies: 4
    Last Post: 11-05-2010, 04:56 AM
  4. refreshing form after running query
    By ninachopper in forum Queries
    Replies: 1
    Last Post: 07-12-2010, 04:30 AM
  5. Running a Query within a Form
    By BrianFawcett in forum Queries
    Replies: 0
    Last Post: 05-12-2010, 09:19 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