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

List box data entry

Status
Not open for further replies.

blade6247

Programmer
Jan 20, 2005
13
GB
I've tried searching for earlier posts like this but to no avail.

I've got a list box on a form - list box is called "themelist"
Form is called "visitinfo"

Users can select up to 14 different options, which I then need to update a table with 14 different "yes/No" fields. (Other fields in this table also)

These yes/no fields are not included on the form - other fields are but form is based on the same table.

Problem is - I can't get it to update.

Code sample:

If [themelist] = "Daily Life" Then
[daily life] = "Yes"
Else:
[daily life] = "No"
End If


etc. etc. for the 14 various fields.
 
I assume that you have MultiSelect set to True. Try something like this in your Listbox lost focus event. It will hopefully you started. Good Luck!

Dim varTemp As Variant
For Each varTemp In ThemeList.Selected
'Your code goes here
Next varTemp

Have a great day!

j2consulting@yahoo.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top