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!

Shooting a SQLstring directly in a textbox 1

Status
Not open for further replies.

Xenocide

Programmer
Jan 20, 2005
76
CA
Hi

Is it possible to put a SQLstring I did in my VB code directly in a textbox?
 
What you want in your textbox, the SQL code or the dataset ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Well I would like the Textbox to show the result of a on the flyquery

doing like this

lst3.RowSource = "Select Table850.Depense " & _
"FROM Table850 " & _
"WHERE Table850.Maitre = '" & lst1.Value & "' " & _
"AND Table850.IdEngagementA <> '" & lst1.Value & "' ;"

but instead of doing it for a listbox I would to do it for a textbox.
 
if you want just 1 value take a look at dlookup
if you want all the values you can open a recordset and loop trhu the set and append it to the textbox
 
thanks pwise.. I never really used a dlookup before

care to point me to some exemple ?
 
dlookup("Depense","Table850","Maitre='" & lst1.Value & "'AND IdEngagementA <> '" & lst1.Value & "'")
 
wa it work perfectly and at the same time solve 2 other problem I had :p

Thanks a lot pwise
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top