how to assign result of a Sum() query to a value or caption?

S

SamwiseGamgee

I created a "Sum of Desposits" query. How do I assign the result of tha
query to a control's caption or value.

I know you can do something like Subform.RecordSource="Sum o
Desposits" and see the value in the subform.

How do I do something like,

Dim x as Currency

x = "Sum of Deposits"

txtBoxBalance.value = x or lblBalance.Caption = x

Thank you very much for any help
 
B

Bas Cost Budde

SamwiseGamgee said:
I created a "Sum of Desposits" query. How do I assign the result of that
query to a control's caption or value.

Obviously only if the query has one field. Set the controlsource of that
control to
=DLookup("nameOfThatField","Sum of Desposits")

(I thought the term is Deposits?)
 

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