473,657 Members | 2,686 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1664
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...@sympa tico.ca" <bob.quin...@gm ail.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
4289
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
6369
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 newbie's not trying to follow ESR's advice.) A month or so ago (in a thread found here: http://tinyurl.com/5bj8j), I suggested that it might help the situation if there were a python.org wiki page that amounted to a "Welcome to the Python community;...
23
2253
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 confused, though - when would I use a list comp instead of a generator expression if I'm going to require 2.4 anyway? Thanks, <mike --
6
6282
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 then the list needs to have a hundred entries, at present when I try to do this each element in my list points to the entire BYTE array, when what I really need is copies of each single BYTE in its own part of the list. I have used code similar...
19
13566
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., head and tail are not connected. Of course, recursive function aproach to traverse the list is one way. But, depending upon the list size, it could overrun the stack pretty fast.
15
25836
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. This is more of a best practices question rather than a technical one. 1) Return a list instance ie std::list myFunction() { std::list list(); return list;
27
5120
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 contents ]; close $fileID
1
2950
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 is pressed then a text box appears to enter a new question or answer or both. the newly entered data is then inserted into mysql. The newly entered data is then requested by mysql_fetch_array() to be displayed as options in the drop down list. If...
17
3125
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 that I am using Allen Browne's multi-select list box for a report as a guide. I should also note that my access skills are not the best so I may need some explaining on certain things. First let me give some background on the database: I have a...
0
2276
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 fl.controls.ComboBox; import fl.controls.TextArea; import fl.containers.UILoader;
0
8407
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8319
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8837
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8739
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
6175
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4329
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2739
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1969
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1732
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.