value from query in text box

Mik3

Registered User.
Local time
Today, 08:56
Joined
Jul 10, 2003
Messages
60
Is there a way of showing data of a query in a text box in a form?

I have a Query "Balance in stores", which is updated with every entry in a form (ie. with a tool being issued or received).

In the form I have a combo box in which one selects a tool from the list for issuing/returning in stores.

I need a text box showing the balance of the tool selected from the combo box. When I put the Balance value of the query in the Control source of the text box, i get an error #Name.
What am I doing wrong? :)
Any ideas?
 
Mik3,

Not sure I completely understand your situation so I can only offer this: Have you investigated DCOUNT and DLOOKUP in the Help file? They are functions used to query datasets and can be added to the control source property of a textbox where a result will be displayed...

Regards,
Tim
 
thanks tim, that is exactly what i meant.
i used DLookUp and it works.
however, it only works the first time a tool is chosen from the combo list.
ie. if A is chosen first, and then B, the balance will remain the same as for A.
is there a way to update it..by writing something in the "On Change" of the Combo list?
 
that solved the problem
many thanks for your help guys
 

Users who are viewing this thread

Back
Top Bottom