How to display query results in text boxes?

  • Thread starter hkgary33 via AccessMonster.com
  • Start date
H

hkgary33 via AccessMonster.com

Dear all,
I’ve built a form that can be divided into two parts. The left-hand part is
for the user to input certain criteria in the textboxes for searching, after
clicking the “search†button, then the relevant search results will be shown
in the right-hand part of the form. I’ve successfully designed the criteria
controls and the query, but how can I display the query results by means of
the textboxes in the right-hand part of the form? Since I don’t want the
query results to be pop-up in the default datasheet view, I just want to show
those results in that form.
For example, after the query runs, it will have 3 cells containing the query
results, how can I get these values and then show it in the 3 textboxes in
the form? How can I set the Control Source of the textboxes?

Thanks a lot!
Gary
 
F

fredg

Dear all,
Iÿve built a form that can be divided into two parts. The left-hand part is
for the user to input certain criteria in the textboxes for searching, after
clicking the ´search¡ button, then the relevant search results will be shown
in the right-hand part of the form. Iÿve successfully designed the criteria
controls and the query, but how can I display the query results by means of
the textboxes in the right-hand part of the form? Since I donÿt want the
query results to be pop-up in the default datasheet view, I just want to show
those results in that form.
For example, after the query runs, it will have 3 cells containing the query
results, how can I get these values and then show it in the 3 textboxes in
the form? How can I set the Control Source of the textboxes?

Thanks a lot!
Gary

The query returns just one record with 3 columns?

=DLookUp("[ColumnName1]","QueryName")
=DLookUp("[ColumnName2]","QueryName")
=DLookUp("[ColumnName3]","QueryName")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top