Results 1 to 3 of 3
  1. #1
    wquinn is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2012
    Posts
    1

    Display results of a query on the main form

    I have a database for a doctors office. I have a form call patient info with a combo box and several fields. I want to be able to select a patient id from the combobox and then click a button to run a query to retrieve the data from the patient id table and display the results in the main form where the combobox is located. I do not want to use a subform, only the main form. Can anybody help me achieve this?



    Thanks.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Is the main form bound to table?
    Maybe this is what you are looking for http://datapigtechnologies.com/flash...tomfilter.html
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    This is essentially the same as the demo June7 gave you a link to, but why not simply let Access do all the work? You may have done some of this already.

    • Create a Form using your Table/Query as the Record Source.
    • Go to the Field List and drag the Fields you want retrieved onto the Form
    • Place a Combobox on the Form.

    When the Combobox Wizard comes up:

    • Select "Find a record on my form based on the value I've selected..."
    • Click on Next
    • Select the appropriate identifying field to appear in the Combobox
    • Click on Next
    • Size the Combobox column
    • Click on Next
    • Name the Combobox
    • Click on Finish

    Now the user can use the dropdown arrow of the Combobox to retrieve the data or simply start typing the identifying data in and the Combobox will start to autocomplete the entry. When the correct entry is found hit <Enter> and the appropriate data should be retrieved.

    Linq ;0)>

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

Similar Threads

  1. Replies: 1
    Last Post: 07-20-2012, 09:48 AM
  2. Display QUERY results into SUB FORM
    By taimysho0 in forum Programming
    Replies: 9
    Last Post: 11-23-2011, 12:26 PM
  3. Replies: 6
    Last Post: 11-17-2011, 10:50 PM
  4. Replies: 1
    Last Post: 12-01-2010, 11:10 AM
  5. display query results in a form
    By P5C768 in forum Queries
    Replies: 3
    Last Post: 08-14-2009, 03:02 PM

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