I have a table (tblMachineHardware) with fields MachineId and PeripheralID. It is a table of what peripheral a particular machine has.
I have a listbox that shows all the various machine peripheral (peripheralID) available AND the peripheral that a particular machine (machineID) currently has is highlighted.
The user can change the particular peripheral a machine has. They can add or remove a peripheral. Here's where I am stump
I can't seem to figure out how to determine if a record in tbleMachineHardware needs to be left in the table or removed. I think I need to loop through the table and compare to items selected in the listbox. But how do I do this without a infinite loop?
On the flipside, I also need to check if new peripheral has been selected to add to this machine. How do I do that without an infinite loop?