Return query results to a form?

  • Thread starter Thread starter JayL.
  • Start date Start date
J

JayL.

Good day,
I have a form linked to a table of persons & contacts -all is well.
I have a command button on the form that is linked to a query that that
brings up a search box which allows me to search for people by partial last
names. Works great. Except the results are returned in a table, not in the
form. How can I get the results in this form or any other form?
Any help is appreciated.

TIA-
Jay
 
JayL. said:
Good day,
I have a form linked to a table of persons & contacts -all is well.
I have a command button on the form that is linked to a query that
that brings up a search box which allows me to search for people by
partial last names. Works great. Except the results are returned in a
table, not in the form. How can I get the results in this form or any
other form?
Any help is appreciated.

Am I right in thinking that your query is a parameter query, so it
displays a parameter prompt (for the partial last name) and applies that
parameter as a criterion, returning all the matching records? If so,
you could simply use that query as the recordsource of a form, and
change your button to simply open the form. Or you could build a form
with an unbound text box in the form header, and let the form's
recordsource refer to that text box as its criteria (via a
"Forms!FormName!ControlName"-style reference), instead of using a
parameter prompt. You'd just need code in the text box's AfterUpdate
event to requery the form.
 
Back
Top