473,473 Members | 2,300 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Adding records to a table using a listbox

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
1 1736
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Danny | last post by:
How to allow users to select a set of records and then let them change a field for all these records at once? I would like to do this in code on a form. I will have a form with tabular view of...
0
by: Tim Graichen | last post by:
Hi all, I have a subform that stores a field Softwaretitle based on a choice made from a listbox that displays all records in TblSWTitle. I have created a small form FrmeditSW that allows me...
2
by: mike | last post by:
Hi All I have a listbox which has a table as its row source. I want to be able to choose from this listbox (which has approximately 8 records) and have this value entered into another table (it...
3
by: Jim Heavey | last post by:
Trying to figure out the technique which should be used to add rows to a datagrid. I am thinking that I would want an "Add" button on the footer, but I am not quite sure how to do that. Is that...
6
by: Dazbear | last post by:
Hi There Have been on a massive learning curve today creating an Access database without having even started the software before this morning! All going well and have learned to create table,...
9
by: Kadett | last post by:
Hi all, I have following problem: I'm creating a ListView (Details) control at run-time and filling it with some records (let's say 10 000). This operation seems to be quite fast, but when I call...
1
by: vbDavidC | last post by:
I am adding a new record to a table via a dataset/adapter. I have got the following to work for me but I am wondering if there is a better way to do this. I am having to have something in my...
9
by: JJ | last post by:
I have a need to add several userid's (for example) to a table in an sql database. The usernames will all added to a listbox (or similar) and a 'submit' button will be clicked to send them to the...
0
by: EricLondaits | last post by:
Hi, I have an ASP.NET page with a ListBox that is data bound to a table with a single field (it holds a list of valid IDs). The page also has a textBox into which you can add new valid IDs, one...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.