result query on a form

F

feorges

hi,

i've made a query to count how many unique values there is on a query of a
specific field. The reuslt is ofcourse one record with a number.
now i will refer on a form to this query and see the result of this query in
a textfield. I've tried into designer mode to refer the field to this query
but i've get an error "#name"

how can i put the value of a query in a textfield on a form ?

regards, Georges
 
J

John W. Vinson

hi,

i've made a query to count how many unique values there is on a query of a
specific field. The reuslt is ofcourse one record with a number.
now i will refer on a form to this query and see the result of this query in
a textfield. I've tried into designer mode to refer the field to this query
but i've get an error "#name"

how can i put the value of a query in a textfield on a form ?

regards, Georges

Simplest would be to set the Control Source of the textbox to a DLookUp
expression:

=DLookUp("[fieldname]", "[queryname]")

You might be able to simplify things by using a DSum or DCount function call,
with criteria; doing so you might be able to dispense with storing the query
at all.
--

John W. Vinson [MVP]
Microsoft's replacements for these newsgroups:
http://social.msdn.microsoft.com/Forums/en-US/accessdev/
http://social.answers.microsoft.com/Forums/en-US/addbuz/
and see also http://www.utteraccess.com
 

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