473,396 Members | 1,816 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,396 software developers and data experts.

List Box question

I have a simple Access database with 4 tables so far. Here is my
question:

Talble 2 lists "vulns" and there descriptions. Each has its own
primary key and relates to table 1.
Table 3 lists "controls" and there descriptions. Each has its own
primary key. Many of each can relate to many in table 2.

Table 4 is a Merge Table, listing each primary key from table 2 and
its relation (primary key) from table 3.

I have a form in which you can type in the primary key (in the first
text box) from table 2. The next text box automatically provides the
description of this key. The next thing is a combo box to select the
record from table 3 which relates to it. (This populates the Merge
table.) However, if the key from table 2 has more than one record
from table 3, you must click the next button, and fill the values in
again with the additional record from table 3.
What I would like to do is have a list box that contains all possible
keys from table three, click which ones apply, (possibly visually
placing these keys in another list box), and have it populate the
Merge Table accordingly. Can anyone point me in the correct direction
if the question is clear enough? Thanks!

Jun 5 '07 #1
2 1649
On Jun 5, 11:12 am, smadden <stephen.mad...@cox.netwrote:
I have a simple Access database with 4 tables so far. Here is my
question:

Talble 2 lists "vulns" and there descriptions. Each has its own
primary key and relates to table 1.
Table 3 lists "controls" and there descriptions. Each has its own
primary key. Many of each can relate to many in table 2.

Table 4 is a Merge Table, listing each primary key from table 2 and
its relation (primary key) from table 3.

I have a form in which you can type in the primary key (in the first
text box) from table 2. The next text box automatically provides the
description of this key. The next thing is a combo box to select the
record from table 3 which relates to it. (This populates the Merge
table.) However, if the key from table 2 has more than one record
from table 3, you must click the next button, and fill the values in
again with the additional record from table 3.
What I would like to do is have a list box that contains all possible
keys from table three, click which ones apply, (possibly visually
placing these keys in another list box), and have it populate the
Merge Table accordingly. Can anyone point me in the correct direction
if the question is clear enough? Thanks!
I would setup 2 listboxes, based on table 3, with inverted filter
criteria from a subquery that send the data to the correct listbox.

The first listbox contains table 3 records which are NOT in table 4 as
filtered by your table 2 combobox. The second listbox contains those
which are present in table 4. A Click on a row of the first listbox
fires an unsert query to add the table 2 and table 3 keys to a new
record in table 4. Then the click requeries listbox1 and listbox2.

Clicking in the listbox2 row runs a delete query on the table 4, again
with the keys from tables 2 and 3 as the criteria, then requeries the
listboxes.

It's not multiselect as you requested but it does work as fast as you
can click the desired items. That's probably faster than
multiselecting then clicking a DoIt command button.

HTH



Jun 5 '07 #2
On Jun 5, 9:36 am, "rquin...@sympatico.ca" <bob.quin...@gmail.com>
wrote:
On Jun 5, 11:12 am, smadden <stephen.mad...@cox.netwrote:


I have a simple Access database with 4 tables so far. Here is my
question:
Talble 2 lists "vulns" and there descriptions. Each has its own
primary key and relates to table 1.
Table 3 lists "controls" and there descriptions. Each has its own
primary key. Many of each can relate to many in table 2.
Table 4 is a Merge Table, listing each primary key from table 2 and
its relation (primary key) from table 3.
I have a form in which you can type in the primary key (in the first
text box) from table 2. The next text box automatically provides the
description of this key. The next thing is a combo box to select the
record from table 3 which relates to it. (This populates the Merge
table.) However, if the key from table 2 has more than one record
from table 3, you must click the next button, and fill the values in
again with the additional record from table 3.
What I would like to do is have a list box that contains all possible
keys from table three, click which ones apply, (possibly visually
placing these keys in another list box), and have it populate the
Merge Table accordingly. Can anyone point me in the correct direction
if the question is clear enough? Thanks!

I would setup 2 listboxes, based on table 3, with inverted filter
criteria from a subquery that send the data to the correct listbox.

The first listbox contains table 3 records which are NOT in table 4 as
filtered by your table 2 combobox. The second listbox contains those
which are present in table 4. A Click on a row of the first listbox
fires an unsert query to add the table 2 and table 3 keys to a new
record in table 4. Then the click requeries listbox1 and listbox2.

Clicking in the listbox2 row runs a delete query on the table 4, again
with the keys from tables 2 and 3 as the criteria, then requeries the
listboxes.

It's not multiselect as you requested but it does work as fast as you
can click the desired items. That's probably faster than
multiselecting then clicking a DoIt command button.

HTH- Hide quoted text -

- Show quoted text -
thanks, I'll give it a try

Jun 5 '07 #3

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

Similar topics

5
by: Mike | last post by:
How do I extract a list of lists from a user defined function and print the results as strings for each list?
0
by: Brian van den Broek | last post by:
Hi all, There have been a few posts over the last month or so expressing a bit of exasperation with the "rising tide of newbie's". (Or, more accurately, the rising tide of questions from...
23
by: Mike Meyer | last post by:
Ok, we've added list comprehensions to the language, and seen that they were good. We've added generator expressions to the language, and seen that they were good as well. I'm left a bit...
6
by: Harry Overs | last post by:
My program needs to take a pointer to BYTE array (unsigned char*) and convert it into a STL list so that each BYTE in the array has its own element in the list, i.e. if the array has hundred bytes...
19
by: RAJASEKHAR KONDABALA | last post by:
Hi, Does anybody know what the fastest way is to "search for a value in a singly-linked list from its tail" as oposed to its head? I am talking about a non-circular singly-linked list, i.e.,...
15
by: Andrew Brampton | last post by:
Hi, This may sound a odd question, but I wanted to know how you return a list of data from a function. These are some of the ways I know how, and I was wondering which method you normally use....
27
by: comp.lang.tcl | last post by:
My TCL proc, XML_GET_ALL_ELEMENT_ATTRS, is supposed to convert an XML file into a TCL list as follows: attr1 {val1} attr2 {val2} ... attrN {valN} This is the TCL code that does this: set...
1
by: student2008 | last post by:
Sorry about the title its a tricky one. I have a form which allows me to add a question and answers into a mysql database via a combination of, if a certain option is chosen and the reset button...
17
by: trose178 | last post by:
Good day all, I am working on a multi-select list box for a standard question checklist database and I am running into a syntax error in the code that I cannot seem to correct. I will also note...
0
by: saijin | last post by:
I'm planning to call a list of data from an XML file but when I duplicate the content inside the <data></data> it is not showing anything Here's the ActionScript 3.0 import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
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
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
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
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...
0
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.