Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Opening Query Results In Form 1

Status
Not open for further replies.

SShefer

Technical User
Aug 7, 2001
20
US
Quick question I am sure you all know the answer too...

How do I make my query open up its results in a form with only those matches available to be seen?

Thanks
 
You can make a listbox on your form and have the query set as the rowsource for the listbox, then when you click the button to "search", refresh the listbox. Is this what you're trying to do?

HTH Joe Miller
joe.miller@flotech.net
 
I am running a quick query right from my main switchboard. I want its results opened in a form instead of table.

Sorry Im very new to Access :(
 
is something as:
DoCmd.OpenQuery "queryname",... acPreview ... acReadOnly

about ac* I'm not sure, you'll see them in context. John Fill
1c.bmp


ivfmd@mail.md
 
Hence my answer, have your switchboard open the form, which has the listbox on it. Then the user will have a form with the data. Am I missing something?

PS - this is the format for opening a query from code:

DoCmd.OpenQuery "MyQueryName", acNormal, acReadOnly
Joe Miller
joe.miller@flotech.net
 
Perhaps this will help:

The "Querie" name MUST match the FIELD name on the form to which you pass the script to. Example:

<%=FP_FieldHTML(fp_rs,&quot;Name&quot;)%>

The above code would be inserted into the field value to have the information passed from the Querie...

Hope it helped!
 
When you create the form, use the form wizard. In the box where you choose the table or query the form is based on, select your query. Continue creating and formating the form until it looks the way you want it. Each time you open the form it will automatically run the query it is based on. The form will only have access to the data in the query results. If you want the data filtered differently each time you run it, I would suggest your query contain parameter(s) to prompt the user for the correct data values to report.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top