Set the form to Continuous View, so it shows one record per row.
Put the unbound controls where the user enters their search parameters into
the Form Header section.
Put the name of the query into the RecordSource of the form.
In the Criteria of the query, enter things like:
Forms!frmRecordSource!txtCaseNumb
where txtCaseNumb represents the name of the unbound text box on the form.
There are actually some limitations to that simple approach, e.g. where you
don't want to use all the search boxes, or where the query is not able to
find the boxes on the form when it first opens. A more powerful solution is
leave the criteria out of the query, and build up a string to use as the
Filter of the form. This is much more flexible and efficient, but does
require some VBA skills. You can download an example for Access 2000 and
later here:
http://allenbrowne.com/unlinked/Search2000.zip
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users -
http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Marina" <ma*********@earthlink.net> wrote in message
news:11*********************@i39g2000cwa.googlegro ups.com...
Ok here's my problem....
I have a custom dialog box that allows the user to enter information to
run a Parameter Query. This works GREAT, but I need that query to show
as a form, not just the basic query screen. I have created the form,
but how in the world do I get it to open based on the parameter query
created by the user.
Ugg... ok now even I'm confused... what a tangled web we weave...
GRRRRR
To simplify...
1) user opens frmRecordSearch
2) user enters the paramiters for the query, ie. ClientID or CaseNumb,
and clicks ok
3) the ok button runs the Query using the following code:
Private Sub cmdOK_Click()
DoCmd.OpenQuery "qryCaseFiles",
acViewNormal, acEdit
DoCmd.Close acForm, "frmRecordSearch"
End Sub
4)User see's the query results...
How can I display the results in a form not the query window???