I Need to select all records except those where Void is True, default is False. It is a value list set to True/False.
If Void = True Then Do Not Print. Code to run before this! Printed = 1 unless Void is True Then Printed = 0 for that record. Void is a field on form with its control source set to Void. I know how to do this is a query but not in vba. The code is run from the form on a command button.
Printed = 1
If Me.Dirty Then Me.Dirty = False 'Force Save Record
stDocName = "Checks"
Forms!ContinuousBlankChecks.Visible = False
DoCmd.OpenReport stDocName, acPreview
Forms!BlankChecks.Visible = True
__________________________________________________ ______________
Here is what I am trying to make work by skipping the next record but maybe I have to do a loop or something, don't know!
If Me.Void = True Then
DoCmd.NavigateTo acCmdRecordsGoToNext
Dim AddItemsAsInventorymsgbox As String
AddItemsAsInventorymsgbox = MsgBox("Print ALL Checks?", vbInformation + vbYesNo, "ContinuousBlankChecks")
If (AddItemsAsInventorymsgbox = vbYes) Then
DoCmd.SetWarnings False
DoCmd.RunCommand acCmdSelectAllRecords
Me.Printed = 1
DoCmd.SetWarnings True
DoCmd.Save
If Me.Dirty Then Me.Dirty = False 'Forces a Save Record.
Me.Requery
End If