By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,939 Members | 1,546 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,939 IT Pros & Developers. It's quick & easy.

Adding records to a table using a listbox

P: n/a
Hi, hope you can help.

Background:
To find out who attended a meeting.
Query:
I have 2 list boxes:

Listbox 1 = listing employees names
Listbox 2 = to list employees names of who attended a meeting.

So, when I double click an employee on listbox1 I would like to update
a table call 'attended' so that I can report on who attended. This in
turn would display the employee in listbox2 after a refresh etc.

Can this be done using VBA?

Thanks for you help.
Matt

Apr 21 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Yes. It is called the "two-list box" technique and is used in some of the
Access wizards. The various editions of Litwin, Getz, et al's "Access
Developer's Handbook" have such code as an example -- recent editions have a
"class module" implementation.

Back in Access 2.0 days, I implemented an application-specific "two list
box" solution that was easier to follow than their general model, I thought.
But, because that book is useful for many other solutions, as well, I'd
suggest that purchasing the book, and using their class module would be a
cost-effective way to handle it.

As with other list boxes, you could implement this with the ListBox row
sources being (1) tables, (2) value lists, or (3) data provided by a
callback function.

Larry Linson
Microsoft Access MVP
"Lynx101" <ma**********@gmail.comwrote in message
news:11**********************@d57g2000hsg.googlegr oups.com...
Hi, hope you can help.

Background:
To find out who attended a meeting.
Query:
I have 2 list boxes:

Listbox 1 = listing employees names
Listbox 2 = to list employees names of who attended a meeting.

So, when I double click an employee on listbox1 I would like to update
a table call 'attended' so that I can report on who attended. This in
turn would display the employee in listbox2 after a refresh etc.

Can this be done using VBA?

Thanks for you help.
Matt

Apr 22 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.