J
Jim Tanis
Please help, I'm on fire!!!
I have a table (tbl1) with the following fields:
ID, name
I lookup that table to get values for a listbox that stores attendees for a
meeting. The issue here is that i can't make this damn listbox to work with
multiple selection.
I want whenever a multiple selection is made, the selected items for the
record to be saved so when I open the form it will display the names i had
selected (from tbl1).
I thought this could be done in the following day (theory works!):
Whenever a multiple selection is made, a new record is added to tbl1 that
sums the names of the attendees. Ok, saving is solved but recalling the
multiple selections???
After 2 days of thought, I worked this around too. I changed the ID column
from autonumber to integer and wrote code, that uses the PARITY BIT
calculation method to give the sole names their ID. aka 1,2,4,8,16,32,64,128
... (2^n where n=1,2,3 etc) and so on . Then, when a multiple selection was
made the ids were summed to give another unique number that is between the
powers of 2. aka if selection was records with IDs 1,2,8 --> the selection
record was given the id 11. Because each sum that is not a power of 2 is
given by only a the sum of powers of 2, issue solved. Or so I thought...
Access'es floating point calculation limit comes here, were it allows me to
have only 31 sole (power of 2) records. Zeros after 31st.
So we're back to zero!!
Q1: Is there another way to do that??? (prime numbers would work just as
well, but there is no way to calculate them )
Q2: I can't figure out how to populate and recall the multiple selected IDs
to use in an append query (to add that "multiple selection" record". A code
snippet would be mostly appreciated (in other posts it's way to specific)
Q3: What happens if in another table the multiple selection made, is prone
to changes? (ID for the selection is recalculated, thus a new "multiple
selection" ID has to be created, but the old one can't be deleted, because it
may be used in another record.
Q4: In the previous case how is the name field changed?? (either if another
selection is added or deleted)
Thanx for any feedback!
I have a table (tbl1) with the following fields:
ID, name
I lookup that table to get values for a listbox that stores attendees for a
meeting. The issue here is that i can't make this damn listbox to work with
multiple selection.
I want whenever a multiple selection is made, the selected items for the
record to be saved so when I open the form it will display the names i had
selected (from tbl1).
I thought this could be done in the following day (theory works!):
Whenever a multiple selection is made, a new record is added to tbl1 that
sums the names of the attendees. Ok, saving is solved but recalling the
multiple selections???
After 2 days of thought, I worked this around too. I changed the ID column
from autonumber to integer and wrote code, that uses the PARITY BIT
calculation method to give the sole names their ID. aka 1,2,4,8,16,32,64,128
... (2^n where n=1,2,3 etc) and so on . Then, when a multiple selection was
made the ids were summed to give another unique number that is between the
powers of 2. aka if selection was records with IDs 1,2,8 --> the selection
record was given the id 11. Because each sum that is not a power of 2 is
given by only a the sum of powers of 2, issue solved. Or so I thought...
Access'es floating point calculation limit comes here, were it allows me to
have only 31 sole (power of 2) records. Zeros after 31st.
So we're back to zero!!
Q1: Is there another way to do that??? (prime numbers would work just as
well, but there is no way to calculate them )
Q2: I can't figure out how to populate and recall the multiple selected IDs
to use in an append query (to add that "multiple selection" record". A code
snippet would be mostly appreciated (in other posts it's way to specific)
Q3: What happens if in another table the multiple selection made, is prone
to changes? (ID for the selection is recalculated, thus a new "multiple
selection" ID has to be created, but the old one can't be deleted, because it
may be used in another record.
Q4: In the previous case how is the name field changed?? (either if another
selection is added or deleted)
Thanx for any feedback!