Kerbouchard
IS-IT--Management
This is supposed to work like this-
User selects the line in the grid they want to edit and click the EDIT button. This sets the controlsource of the textboxes above the grid to the controlsource of the grid. Here the user can make their changes and click the SAVE button. Then the commands below should occur. This is the third CASE statement of DO CASE but it's the only one that doesn't work. Nothing gets updated with the user changes.
CASE thisform.txtitem.controlsource="quotes1.item"
replace extprice with thisform.txtprice.value*VAL(thisform.txtquantity.value) IN quotes1
replace discount with thisform.txtdiscount.value IN quotes1
replace disc with VAL(thisform.txtdiscount.value) in quotes
replace discext with (thisform.txtprice.value*VAL(thisform.txtquantity.value))-(thisform.txtprice.value*VAL(thisform.txtquantity.value)*(VAL(thisform.txtdiscount.value)/100)) in quotes1
replace image with a_icitem.picture2 in quotes1
tableupdate()
thisform.txtitem.controlsource=""
thisform.txtquantity.controlsource=""
thisform.txtitemdesc.controlsource=""
thisform.txtprice.controlsource=""
thisform.txtdiscount.controlsource=""
thisform.grid1.doscroll(2)
thisform.grid1.refresh()
thisform.refresh()
thisform.image1.picture="S:\images\noimage.bmp"
thisform.txtitem.setfocus()
Any help would be greatly appreciated, I've been looking at this stupid thing all morning.
User selects the line in the grid they want to edit and click the EDIT button. This sets the controlsource of the textboxes above the grid to the controlsource of the grid. Here the user can make their changes and click the SAVE button. Then the commands below should occur. This is the third CASE statement of DO CASE but it's the only one that doesn't work. Nothing gets updated with the user changes.
CASE thisform.txtitem.controlsource="quotes1.item"
replace extprice with thisform.txtprice.value*VAL(thisform.txtquantity.value) IN quotes1
replace discount with thisform.txtdiscount.value IN quotes1
replace disc with VAL(thisform.txtdiscount.value) in quotes
replace discext with (thisform.txtprice.value*VAL(thisform.txtquantity.value))-(thisform.txtprice.value*VAL(thisform.txtquantity.value)*(VAL(thisform.txtdiscount.value)/100)) in quotes1
replace image with a_icitem.picture2 in quotes1
tableupdate()
thisform.txtitem.controlsource=""
thisform.txtquantity.controlsource=""
thisform.txtitemdesc.controlsource=""
thisform.txtprice.controlsource=""
thisform.txtdiscount.controlsource=""
thisform.grid1.doscroll(2)
thisform.grid1.refresh()
thisform.refresh()
thisform.image1.picture="S:\images\noimage.bmp"
thisform.txtitem.setfocus()
Any help would be greatly appreciated, I've been looking at this stupid thing all morning.