E
Emmy
Hi,
I have the following code running from a button on a form. It works for the
current record and then moves to the next record, but the user has to click
the button again and so on. How can I make this code run through every record
on the form until the field [Forms]![frmInvoiceReceived]![ItemNo] Is Null?
Private Sub CopyInvoiceNumberToAllChecked_Click()
With CodeContextObject
DoCmd.SetWarnings False
If (.VendorWasPaid Like "-1") Then
Forms!frmInvoiceReceived!InvoiceNumber =
Forms!frmInvoiceReceived!InvoiceNo
End If
DoCmd.RunCommand acCmdRefresh
DoCmd.GoToRecord , "", acNext
End With
mcrSetValueInvoiceReceived_Exit:
mcrSetValueInvoiceReceived_Err:
End Sub
Thanks so much for your help!
Emmy
I have the following code running from a button on a form. It works for the
current record and then moves to the next record, but the user has to click
the button again and so on. How can I make this code run through every record
on the form until the field [Forms]![frmInvoiceReceived]![ItemNo] Is Null?
Private Sub CopyInvoiceNumberToAllChecked_Click()
With CodeContextObject
DoCmd.SetWarnings False
If (.VendorWasPaid Like "-1") Then
Forms!frmInvoiceReceived!InvoiceNumber =
Forms!frmInvoiceReceived!InvoiceNo
End If
DoCmd.RunCommand acCmdRefresh
DoCmd.GoToRecord , "", acNext
End With
mcrSetValueInvoiceReceived_Exit:
mcrSetValueInvoiceReceived_Err:
End Sub
Thanks so much for your help!
Emmy