Query Results in multiple text boxes

  • Thread starter Thread starter pfm721
  • Start date Start date
P

pfm721

Currently I have a form that takes a user input and runs a parameter query
returning only one record at a time. When it returns the record I would like
it to display the results on the search form and not in a pop up window. What
would be the best way to go about it? I tried to use 4 text boxes with some
variation of this code =DLookUp("[APC]","qryAPClookup") to look up the four
fields in the query but it doesn't work when there is more than one for some
reason. Any ideas?
 
Base your form on a query that uses the "TOP n" predicate, in this
case, TOP 1. That will return just one record.

HTH
 
My problem is not that it returns more than one record. In this particular
instance the way that they data is populated it will only return one record
or no record. Sorry if I am confusing you. Currently the user inserts a value
in a combo box that is tied to a parameter query. Then the user clicks on a
command button that runs the query. When the query runs it pops up a data
sheet with the record that I want. What I would like to do is make it return
the results on the search form itself. I tried to do that with the text boxes
and Dlookups but it doesn't seem to work if I put more than one text box on
the form. I tried to have it display the results in a list box, but I was
unable to get the list box to refresh when I run the search a second time.
Finally I still have not been able to stop the query results window from
popping up. I appreciate any help with this as I am fairly nex to this.
Thanks.

Larry Daugherty said:
Base your form on a query that uses the "TOP n" predicate, in this
case, TOP 1. That will return just one record.

HTH
--
-Larry-
--

pfm721 said:
Currently I have a form that takes a user input and runs a parameter query
returning only one record at a time. When it returns the record I would like
it to display the results on the search form and not in a pop up window. What
would be the best way to go about it? I tried to use 4 text boxes with some
variation of this code =DLookUp("[APC]","qryAPClookup") to look up the four
fields in the query but it doesn't work when there is more than one for some
reason. Any ideas?
 
Back
Top