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

Returning Values From Table to ListBox

Status
Not open for further replies.

EMoore12

Technical User
Oct 6, 2004
30
0
0
US
I have a form that has a combo box that contains items and a multi-select list box that contains values. The multi-select list box is populated based on the item that is selected in the combo box. What I want to happen is once the user selects an item from the combo box, if that item already exists in the table then the values that exist for that item should appear in the multi-select list box. Here is a snippet of the code I have on the after update of the item field.

lstItemValue.RowSource = DLookup("ItemValue", "tblExclusion", "[State]=forms!frmExclusion!txtState" & _
" And [Event]=forms!frmExclusion!txtEvent" & _
" And [Year]=forms!frmExclusion!txtYear" & _
" And [Revisingcode] = '" & strRevisingCode & "'" & _
" And [ItemName]= '" & strItemName & "'")

This code prompts me with a parameter box.

Any help would be greatly appreciated.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top