Query results as a Control Source for a Text Box on an unbound for

W

WildlyHarry

How do I use a query result as a Control Source for a text box on an unbound
form, without using a subform? I do not want to use a subform. Because I
want to use the results of the query in an expression in conjunction with
data entered by the user on the form. Also there is only one field and the
subform does not conform to the visual design ascribed to this form.
 
M

Maurice

Maybe you could use a Dlookup. Something like:

=DLookup("fieldname", "queryname", "wherestatement-optional")

place this in the unbound field on your form and replace the names between
the double quotes for your own field and queryname. You need to place the
double quotes around thenames though.

hth
 
W

WildlyHarry

Worked like a charm thanks

Maurice said:
Maybe you could use a Dlookup. Something like:

=DLookup("fieldname", "queryname", "wherestatement-optional")

place this in the unbound field on your form and replace the names between
the double quotes for your own field and queryname. You need to place the
double quotes around thenames though.

hth
 
Top