G
Guest
I have a form with 3 Multi-Select list Boxes, each based off of a table:
lstVehicle, lstTechnology & lstPosition.
The mainform recordsource is another table that has the following fields:
fldQuoteID
fldVehicleID
fldTechID
fldPosID.
What's the best way to insert/append new records into the recordsource table
using all of the values selected in the list box?
I would need to add every combination of values selected in all the list
boxes combined.
So, if I have the following values selected in the list boxes:
Vehicle1, Vehicle2; Tech1,Tech5; Pos3;Pos4
I would have the following Records Added:
QuoteID; Vehicle1;Tech1;Pos3
QuoteID; Vehicle2;Tech1;Pos3
QuoteID; Vehicle1;Tech1;Pos4
QuoteID; Vehicle2;Tech1;Pos4
QuoteID; Vehicle1;Tech5;Pos3
QuoteID; Vehicle2;Tech5;Pos3
QuoteID; Vehicle1;Tech5;Pos4
QuoteID; Vehicle2;Tech5;Pos4
My other thought would be to use 3 subforms instead of listboxes, add a
Check Box field to each of the child tables. Then just have a query insert
based off of the records that are checked.
After switching records, reset all the checks to un-checked.
Thanks,
MikeZz
lstVehicle, lstTechnology & lstPosition.
The mainform recordsource is another table that has the following fields:
fldQuoteID
fldVehicleID
fldTechID
fldPosID.
What's the best way to insert/append new records into the recordsource table
using all of the values selected in the list box?
I would need to add every combination of values selected in all the list
boxes combined.
So, if I have the following values selected in the list boxes:
Vehicle1, Vehicle2; Tech1,Tech5; Pos3;Pos4
I would have the following Records Added:
QuoteID; Vehicle1;Tech1;Pos3
QuoteID; Vehicle2;Tech1;Pos3
QuoteID; Vehicle1;Tech1;Pos4
QuoteID; Vehicle2;Tech1;Pos4
QuoteID; Vehicle1;Tech5;Pos3
QuoteID; Vehicle2;Tech5;Pos3
QuoteID; Vehicle1;Tech5;Pos4
QuoteID; Vehicle2;Tech5;Pos4
My other thought would be to use 3 subforms instead of listboxes, add a
Check Box field to each of the child tables. Then just have a query insert
based off of the records that are checked.
After switching records, reset all the checks to un-checked.
Thanks,
MikeZz