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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Assign query result to textbox

Status
Not open for further replies.

Maldini

Technical User
Nov 10, 2002
55
GB
Hi,

Just a quick question (I hope), which has left me stuck.
I have this SQL query, which returns one value. I'm hoping to assign to returned value to a textbox on one of my forms (open when the query is run).
However, despite going into the VBA, setting the text, value or controlsource properties, it doesn't seem to be updating this textbox value.

Could someone offer some pointers?
Thx

Maldini
 
Usually you would just do the following, where txtTextBox is the control on your form and Value is the value (text/number/date or whatever the value resulting from the query is).

Me.txtTextBox = Value

You mention in your question that you've tried to set using one of the properties. Actually, you don't specify a property to accomplish this, you just set the control directly as listed above.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top