467,907 Members | 1,430 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,907 developers. It's quick & easy.

Appending from 2 multiselect listboxes


I'm moving forward with a topic I've posted a couple of time before but
still haven't cracked it, any further help is much appreciated.
In a nutshell, I want to append either 1 or a selection of group
members with either 1 or a selection of activity names into a
assessment table called- tblAssessmentActivityProfile from 2
multiselect listboxes on a form.

[Group Member ID] is the primary key I wish to append from
tblGroupMembers into the [Group Member ID] field for
tblAssessmentActivityProfile from the 1st listbox (List0) and [Activty
Name] is the field I wish to append into the [Activty] field in the
same tblAssessmentActivityProfile from the second listbox (List2).

My code, which a fellow group member recommended is:
Private Sub Command5_Click()
For Each lb0ID In List0.ItemsSelected
For Each lb1ID In List2.ItemsSelected
DoCmd.RunSQL "INSERT into tblAssessmentActivityProfile ( [Group
Member ID], [Activity] ) " _
& " VALUES ( " & lb0ID & "," & lb1ID & ")"
End Sub

This appends a different Group Member ID to the one I select and rather
than append the activity name it appends a number. I'm now stuck and
have limited experience with coding, for a start I don't know what
lb0ID and lb1ID are!

Thanks for your time.


Nov 13 '05 #1
  • viewed: 1001

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by cableguy | last post: by
6 posts views Thread by deejayquai | last post: by
3 posts views Thread by Lenard Gunda | last post: by
5 posts views Thread by doncee | last post: by
1 post views Thread by ksex948 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.