I am currently working on a restaurant project where if a user selects the specific index of an item the price comes up on the screen. I am having issues with working on the remove button. It removes the items but when there are no items left to select, the subtotal for all orders does not display the correct price. Below is the code I am currently working on. If anyone can help, I would greatly appreciate it.
<!-- BEGIN TEMPLATE: bbcode_code -->
Code:
<STYLE>.alt2 font {font: 11px monospace !important;color: #333 !important;}</STYLE>
If lstCurrentOrder.ListIndex = -1 Then
MsgBox ("There isn't anything selected/left to remove")
Else Dim index_list As Double index_list = (lstCurrentOrder.ListIndex)
dordercost = dordercost - adCosts(index_list)
lstCurrentOrder.RemoveItem index_list
lstCurrentOrderCost.RemoveItem index_list
boxOrderTotal.Text = Str(dordercost)
End If
</PRE>
<!-- BEGIN TEMPLATE: bbcode_code -->
Code:
<STYLE>.alt2 font {font: 11px monospace !important;color: #333 !important;}</STYLE>
If lstCurrentOrder.ListIndex = -1 Then
MsgBox ("There isn't anything selected/left to remove")
Else Dim index_list As Double index_list = (lstCurrentOrder.ListIndex)
dordercost = dordercost - adCosts(index_list)
lstCurrentOrder.RemoveItem index_list
lstCurrentOrderCost.RemoveItem index_list
boxOrderTotal.Text = Str(dordercost)
End If
</PRE>
Last edited: