Link to home
Start Free TrialLog in
Avatar of Jenkins
JenkinsFlag for United States of America

asked on

Display query results in a textbox

How do I display the result of the following query in a textbox on my access form?

 SELECT [Query3].[Current Balance] FROM Query3;
ASKER CERTIFIED SOLUTION
Avatar of DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Another way, from the form/report design view:

=DLookup("[Current Balance]", "[Query3]")

This likewise assumes there is only ever a single result.
Another way, when you can create an expression right in the text box:

Save that SQL as a saved query ... lets call it qryCurrBal.

Then, in the Text box Control Source, do this=

=DLookup("[Current Balance]","qryCurrBal")

including the equals sign.

mx
Avatar of Jenkins

ASKER

Thanks.