473,385 Members | 1,740 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Appending from 2 multiselect listboxes

Hi

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 & ")"
Next
Next
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.

David

Nov 13 '05 #1
0 1132

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Alan Lane | last post by:
Hello world: I'm using Access 2003. I have 2 listboxes. One is a single column. The other has two columns. I can use Dev Ashish's code (thanks Dev!) from the Access MVP Website to accumulate...
1
by: cableguy | last post by:
I have a report that gets its criteria from an unbound form. The form has three fields: Month, System, and TechID. I would like to use two mulitselect listboxes to allow the user to select more...
6
by: deejayquai | last post by:
Hi I'm still trying to solve my problem. I have two tables- students and activity assessments, they're linked one-to-many. From a lookup/combo/list I'd like to be able create a series of new...
3
by: Lenard Gunda | last post by:
Hi, I have the following problem. On a page I have a multiple selection listbox. It contains a lot of items. When items near the bottom are selected, and I do a postback, the control jumpst to...
5
by: doncee | last post by:
Please point me in the direction of some good, free web based resources\ documentation for information on developing the multi select list boxes. Have made extensive use of the non-multi list...
0
by: HydroPnik | last post by:
Hi all! What a great community you have here. Being an Access newbie I have already used much information gleaned from the other posters for my current project. I have been tasked with creating a...
1
by: ksex948 | last post by:
Hi, I am working with two listboxes that are initially getting populated from database tables (Access). They basically allow the user to transfer information back and forth from one listbox to...
1
by: asharma0001 | last post by:
Hi all, I was wondering whether somebody might be able to help me with a question I have on a MS Access Database I'm building. I have created a search form with a few multiselect listboxes....
4
by: Dan2kx | last post by:
Good eve peeps, got a quicky for ya (hopefully) i have two multiselect listboxes on a form and i would like a query to show all the selected values from both boxes, i tried to sting the data...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.