Results 1 to 7 of 7
  1. #1
    Nelson12 is offline Novice
    Windows XP Access 2007
    Join Date
    Jan 2010
    Location
    Philadelphia
    Posts
    12

    Opening Query results Inside a Form


    Hello I am using Microsoft Access 2010 on Windows 7 64 bit OS
    I am trying to show my query results inside of the form that the user is using to search.
    I am new to Access so there are some things I don’t know yet.
    My query is showing results based on the text criteria I type into my form txt boxes
    All I want is for when I click “Search” button is will show the results in a SubForm on this form. I DO NOT want to see all records.
    If you can help, please make your explanation simple and step by step, I have tried to follow other online help but I can’t understand.
    Thank you all for any help.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    50,445
    A subform is not required for this.

    A parameterized query is one approach. Review 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
    Nelson12 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2010
    Location
    Philadelphia
    Posts
    12
    thank you for the link, but i need to do the opposite of what that video explained

    i need the search results to show in relation to what is typed in. i have to many records for there to be a combo box

  4. #4
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,863
    Can you reference your textbox controls in a parameterized query using the criteria example in the video?

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    50,445
    The technique is the same and will work with textbox. Can use two wildcards

    Like "*" & Forms!MyForms!MySelector & "*"
    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.

  6. #6
    Nelson12 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2010
    Location
    Philadelphia
    Posts
    12
    Quote Originally Posted by June7 View Post
    The technique is the same and will work with textbox. Can use two wildcards

    Like "*" & Forms!MyForms!MySelector & "*"
    I have done this already. Put simply when I run my query from my form it opens up another window with my query results. I don't want that. I want the results to OPEN ON the form itself, not create another tab or window.

    I need step by step directions because I don't know how to code this directly.

  7. #7
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    50,445
    Just make the query the RecordSource for the form.

    Code behind button on form will requery the form instead of opening the query.

    I think the video demonstrates that.
    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.

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

Similar Threads

  1. Replies: 10
    Last Post: 09-13-2012, 07:22 PM
  2. Replies: 1
    Last Post: 09-05-2012, 07:04 AM
  3. Replies: 6
    Last Post: 05-14-2012, 07:24 AM
  4. Opening form with parameter query
    By Lowell in forum Forms
    Replies: 5
    Last Post: 04-01-2012, 04:46 PM
  5. Before query event when opening form
    By tuna in forum Forms
    Replies: 7
    Last Post: 05-31-2010, 10:35 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