
October 20th, 2006, 08:08 PM
|
|
Registered User
|
|
Join Date: Oct 2006
Posts: 1
Time spent in forums: 3 m 45 sec
Reputation Power: 0
|
|
|
HELP with returning multiple values to a textbox!!!
Basically I have a query that I want to output to a textbox (list box will work, although I HAVE to use the text box). I want the textbox to output all of the records in the query into the textbox like this(record amount will vary)…
A B F FREIGHT SYSTEM (-3), ALLIANCE SHIPPERS (20), HUB GROUP (65), ROADWAY EXPRESS (56),
MAERSK LINE (-4)
Currently is it only outputting like this…
A B F FREIGHT SYSTEM (-3)
The code I currently have is
Quote:
Private Sub Command30_Click()
CUSTOMERS.Value = DLookup("[Account] & ' ' & '(' & [VAR] & ')' ", "Customer Variance")
End Sub |
I know DLookup only returns one value, so I’m thinking I need to make a loop but I don’t know how to go about this. So if someone could give me an example or help that would be great!!!
PS. The query uses critera from the form, so I have to click a button that will run the query. And the table has thousands of records so it would take to long if I directly linked it to an object.
|