Show result of query onto from

  • Thread starter Thread starter Deano
  • Start date Start date
D

Deano

Can anyone help me here.
What I am trying to do is show the result of a query on the form. The query
is returning the number of entry in a table and thus is only one number eg
52. How can I display this on a form.

I have tried running an sql and tried setting the value to the field but it
returns nothing.

thanks in advance
 
Deano said:
What I am trying to do is show the result of a query on the form. The query
is returning the number of entry in a table and thus is only one number eg
52. How can I display this on a form.

I have tried running an sql and tried setting the value to the field but it
returns nothing.


You can use the DLookup function in a text box expression:

=DLookup("fieldinquery", "queryname")

Or if the calculation is as simple as indicated in your
question. you don't really need a query. Just use the
DCount function:

=DCount("*", "thetable")
 
Thankyou - It worked a treat

Cheers

Marshall Barton said:
You can use the DLookup function in a text box expression:

=DLookup("fieldinquery", "queryname")

Or if the calculation is as simple as indicated in your
question. you don't really need a query. Just use the
DCount function:

=DCount("*", "thetable")
 
Back
Top