Avatar of Jenkins
Jenkins
Flag 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;
Microsoft Access

Avatar of undefined
Last Comment
Jenkins

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
DatabaseMX (Joe Anderson - Former Microsoft Access MVP)

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Patrick Matthews

Another way, from the form/report design view:

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

This likewise assumes there is only ever a single result.
DatabaseMX (Joe Anderson - Former Microsoft Access MVP)

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
Jenkins

ASKER
Thanks.
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck