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

List Box, need list.value(selected value) in a query. 1

Status
Not open for further replies.

elevator

Programmer
Apr 23, 2002
19
US
I have a list box on my form with three choices.

Choice
-------
One
Two <-------- I chose Two, so it is highlighted.
Three
-------
When I click on either One, Two or Three it lights up
and the object explorer, properties, list.value box
indicates which choice is highlighted.

How do I get the list.value from the listbox to a string?

Var
Choice String
endVar

Q1= Query
IceCream.db | Scoops |
| ~Choice |
endQuery

 
Elevator,

You need to grab the Value proprty of the field object containing the list box, e.g:

Code:
   choice = field1.Value

If that doesn't work, then name the list object and the use:

Code:
   choice = field1.ListName.List.Value

Hope this helps...

-- Lance
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top