B
BRENNON
Yesterday there was a post which read: "Is there a way to
save data chosen from a multi-select list box in a single
table field? For example, in the list box, the user
chooses Animal, Inset, and Nature. The table then saves
all three of these choices in teh field "topic"."
----------------------------------------------------------
A response was posted which indicated to do the following:
Add a text box control to your form. Set its...
'ControlSource' property to 'Topic'
'Visible' property to 'No'
'Name' property to 'txtTopic'
use the AfterUpdate() event of your existing list box to
populate it.
Priveate Sub MyListBox_AfterUpdate()
Dim var as Variant
Dim ctl as ListBox
Dim str as String
For Each var in ctl.ItemsSelected
str- str & ";" & ctl.ItemData(var)
Next var
Me!txtTopic= Mid(str,2)
End Sub
save data chosen from a multi-select list box in a single
table field? For example, in the list box, the user
chooses Animal, Inset, and Nature. The table then saves
all three of these choices in teh field "topic"."
----------------------------------------------------------
A response was posted which indicated to do the following:
Add a text box control to your form. Set its...
'ControlSource' property to 'Topic'
'Visible' property to 'No'
'Name' property to 'txtTopic'
use the AfterUpdate() event of your existing list box to
populate it.
Priveate Sub MyListBox_AfterUpdate()
Dim var as Variant
Dim ctl as ListBox
Dim str as String
For Each var in ctl.ItemsSelected
str- str & ";" & ctl.ItemData(var)
Next var
Me!txtTopic= Mid(str,2)
End Sub