RedWingsFan44
New member
- Local time
- Today, 04:39
- Joined
- Apr 22, 2013
- Messages
- 7
I'm using Access 2010 and have a form that is basically the last step in generating a report (which will be a printable invoice).
I am facing major problems when it comes to removing line items that the user may have accidentally clicked. I have a checkbox field embedded in the table (tblLineItems) which is set up as binary. I have created a form from tblLineItems, and have in turn embedded that as a subform on the invoice generating form.
When I select line items, I have them populating a two column listbox that shows the user what they have selected before actually opening the report. The code I am using is on the checkbox click event in the subform:
______________________
If the user unclicks one of these line items I cannot figure out how to remove this item from the listbox!
I have tried the removeitem method but it is not working!
If someone can steer me in the right direction or has a better way of going about my problem, it would be greatly appreciated.
Thanks!
I am facing major problems when it comes to removing line items that the user may have accidentally clicked. I have a checkbox field embedded in the table (tblLineItems) which is set up as binary. I have created a form from tblLineItems, and have in turn embedded that as a subform on the invoice generating form.
When I select line items, I have them populating a two column listbox that shows the user what they have selected before actually opening the report. The code I am using is on the checkbox click event in the subform:
Code:
Private Sub InvoiceY_N Click()
Dim InvLineTotal As Currency
If InvoiceY_N.Value = True Then
InvLineTotal = ([PO Line Item Total])
Form_frmInvoiceNew.ListLineitemsold.AddItem ([PO_Line__] & ";" & (InvLineTotal))
Me.Refresh
End If
If the user unclicks one of these line items I cannot figure out how to remove this item from the listbox!
I have tried the removeitem method but it is not working!
Code:
'If InvoiceY_N.Value = False Then
'InvLineTotal = ([PO Line Item Total])
'Form_frmInvoiceNew.ListLineitemsold.RemoveItem ([PO_Line__] & ";" & (InvLineTotal))
'Me.Refresh
'End If
Thanks!
Last edited: