Re: dual combo box
From: Miaplacidus (Mia_placidus_at_hotmail.com)
Date: 08/13/04
- Next message: Wayne Morgan: "Re: Resizing a form programmatically"
- Previous message: Jan Il: "Re: Access Viewer"
- In reply to: Wayne Morgan: "Re: dual combo box"
- Next in thread: Wayne Morgan: "Re: dual combo box"
- Reply: Wayne Morgan: "Re: dual combo box"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 13 Aug 2004 08:50:00 -0700
The values in neither column are unique, but the
combination of the two values is unique. Therefore I
cannot acess the second column by linking through the
first. The user must have human intelligence and local
knowledge in order to select the right pair.
I suppose I could put the pairs in a table and add a
primary key. Then, as you say I could store the number in
the table and look up both the values when I need to
display them.
However, as time goes by the user may generate new pairs
that are not on the list. Then I need to capture the new
info and put it on the list, which adds another level of
complication.
I can base a combo box on the current values of this
table, have the user select one and enter that value into
the current record, current field. If the user doesn't
select a value he can enter a new one, which will appear
in the combobox next time. Why can't I do that with two
values and two fields? If the pair exists, select it and
store both values in the respective fields of this record;
otherwise enter your own data.
What you say is more "Database Correct", but sometimes it
doesn't make sense. If I go your route, then every time I
look at a table all I see is a bunch of key field numbers.
In order to make sense out of the table I have to go make
a bunch of queries to turn all the links back into a flat
file temporarily, just so I can see the data. Constructing
all the links and keeping track of them may take more time
and space than just storing the (admittedly redundant)
data.
>-----Original Message-----
>First, why do you need to? If the two columns
are "joined" you should be
>able to access the value of the second column by linking
through the first
>column. For example, it is normal to do this by having a
table that holds a
>text value for the user and an autonumber primary key
value for Access. When
>the user makes a selection in the combo box the value in
the number column
>is stored in the table. To get the text value for
displaying later you would
>add both tables to a query and link them on this number
field. You could
>then retrieve the text value that is associated with the
number that has
>been stored.
>
>--
>Wayne Morgan
>MS Access MVP
>
>
>"Miaplacidus" <Mia_placidus@hotmail.com> wrote in message
>news:52d801c48095$9252d140$a401280a@phx.gbl...
>> I have a combo box that displays two columns. On
selecting
>> an entry one column is stored in the correct database
>> field.
>>
>> I would like to store the other column in a different
>> database field. How would I go about that?
>
>
>.
>
- Next message: Wayne Morgan: "Re: Resizing a form programmatically"
- Previous message: Jan Il: "Re: Access Viewer"
- In reply to: Wayne Morgan: "Re: dual combo box"
- Next in thread: Wayne Morgan: "Re: dual combo box"
- Reply: Wayne Morgan: "Re: dual combo box"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|