Results 1 to 7 of 7

Thread: [Resolved] ListBox Database Remove Item Dilemma

Threaded View

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2005
    Posts
    4

    Resolved [Resolved] ListBox Database Remove Item Dilemma

    I am trying to write an order entry program where an individual enter orders and order details. So far everything i have done works except one thing. I need to program in a way to select an item from a list box, then click a button and remove that detail from the order as well as from the database that it is being entered into. For example/ my program is linked to an access database. when a user enters the proper information and clicks a "add detail" button, that information is inserted into my database table OrderDetails as well as populated into a listbox so that a user can view all line items of the order. if the user selects an item from the listbox, i need to somehow extract from that entry the first item of the entry, in this case orderdetailid, insert that orderdetailid into a sql statement and also remove that entry from the listbox.
    My line items displayed in the listbox resemble the following:

    27 Widget1 7.00 2 14

    where 27 is the orderdetail id, widget1 the description, 7.00 the price, 2 the quantity, and 14 the extended price. I need to somehow be able to select a line item from the list box, pull that orderdetailid, in this case 27, from it, then insert that returned string into my sql statement and remove the line item from the listbox. Does anyone know how to extract this information. All i seem to be able to do is find the selectedindex which merely returns the index value of the item in the listbox. Thanks in advance for any and all help.
    Last edited by Firehawk; Oct 10th, 2005 at 09:43 PM.

Posting Permissions

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



Click Here to Expand Forum to Full Width