Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query into Unbound Text Field

Status
Not open for further replies.

gharabed

Programmer
Sep 7, 2001
251
US
This is probably an embarassingly simple problem but is a problem in any case. How do I execute an SQL statement that returns a single value and put that value into an unbound text field? Sounds simple enough. Do I have to create a VB module and use ADO calls? Isn't there an easier way to do this? Is there a macro I can use? I tried using SetValue but I don't think you can use a query in the "expression". Any help is appreciated.
 

Use the DLookUp function. Add the function to the Contro SOurce of teh text box.

=DLookUp("name","employees","[empid]=1") Terry L. Broadbent
FAQ183-874 contains tips for posting questions in these forums.
NOTE: Reference to the FAQ is not directed at any individual.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top