Placing result of query in text box on form.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

A simple one (I think).

How do I get the results of a query to be placed in a text box on a form.
The Text Box is called 'Txt_Color' and the query is called qry_colors with
one field 'color'.

I will place the code in the on_load property.
 
assuming that you want to display data from only one record in the query,
you can use a DLookup() function to return the value you want from the field
in the query. either set criteria in the query so it returns only one
record, or set criteria in the function so that it finds a specific record
to return the value from. if you've never used the DLookup() function,
recommend that you read up on it in Access Help so you'll understand how it
works.

hth
 
Back
Top