Results 1 to 2 of 2
  1. #1
    Join Date
    May 2004
    Posts
    13

    Unanswered: ListBox and table

    Hi,

    I should know this but I am stumped.

    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?

    Thanks for your help.

    Tina

  2. #2
    Join Date
    Oct 2003
    Location
    Chicago, IL
    Posts
    34
    This is the sort of thing I would usually write a stored procedure for. If that's not an option, I would create two array list and use the "contains" property to loop through each item.
    DigiOz Multimedia
    http://www.digioz.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •