I have an "order "form with "Item_Order_Line" as a subform.
I have an invoice button on the order form to start a create invoice process. On the Item_Order_Line subform I have tick boxes against each line.
I want the invoice button to select the lines which have been ticked (unbound tickbox) - so I can fill them with an invoice number. I have written the following code to first check if any have been ticked, but it just gets stuck in a loop. Is this because I cannot loop through screen rows or is the "do while " wrong?
If I should be using a recordset how do I recognise the selected lines - they have just been ticked (and the tick not saved anywhere).
'Check if any lines were selected for invoicing
Dim linesq As Boolean
linesq = False
Do While Item_Order_Line.Form.NewRecord = False
If Item_Order_Line.Form!InvMe = True Then
linesq = True
If linesq = False Then
MsgBox "Please select item(s) to invoice.", 0 + 64
Please help - ASAP please!