Results 1 to 4 of 4
  1. #1
    rdeleon is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Jul 2012
    Posts
    3

    Open a form through a query

    Hello



    I am working on setting up a report that references a query for data. The query requires the user to choose from a list of individuals to search. At this point the user must open the form separately before opening the report (or running the query). Is there a way for me to consolidate this into a singular step?

    Thank you!

  2. #2
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    Create a selection form, that has a Combo Box where the user choose who to search on. Then have a Command Button, that when pressed will update the SQL code of the query with that criteria (via VBA), and then open your Report (which is based on the query you just updated via VBA).

  3. #3
    rdeleon is offline Novice
    Windows XP Access 2007
    Join Date
    Jul 2012
    Posts
    3
    Thank you so much! I have another quick question if you are able to help.
    After the user selects the individual to search, the report opens and everything works. However, by selecting the individual to search some of the data in the table is changed. The [Individual] column in the original data table updates the last entry to that name, even though that was not the original name in that slot. Is there a way to prevent this?

  4. #4
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    That shouldn't been happening, unless there is a problem with your query (or perhaps you are running an Update or Append Query)?
    Maybe if you post the code you came up with, we may be able to see if something sticks out.

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

Similar Threads

  1. Open Report after query
    By holta in forum Reports
    Replies: 3
    Last Post: 01-12-2012, 02:39 PM
  2. Can't open query
    By scotty22 in forum Queries
    Replies: 8
    Last Post: 08-03-2011, 07:20 AM
  3. How to open a query in a form
    By Need_Help in forum Forms
    Replies: 5
    Last Post: 07-01-2011, 01:47 PM
  4. Open a query
    By zhshqzyc in forum Programming
    Replies: 1
    Last Post: 01-25-2011, 12:56 PM
  5. Open Query from another database
    By thestappa in forum Programming
    Replies: 2
    Last Post: 07-23-2010, 08:45 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