Checking fields null

tambadal

New Member
Joined
Oct 31, 2019
Messages
10
Code:
Private Sub Command228_Click()
'Save
On Error GoTo Command228_Click_Err

    On Error Resume Next
    DoCmd.RunCommand acCmdSaveRecord
    If (MacroError <> 0) Then
        Beep
        MsgBox MacroError.Description, vbOKOnly, ""
            End If

Command228_Click_Exit:
    Exit Sub
Command228_Click_Err:
    MsgBox Error$
    Resume Command228_Click_Exit
End Sub
How do you modify the code to where it will check these 4 fields "Debarred, Restricted, CommType, and Approval_Status" are null before saving.
 

welshgasman

Well-known Member
Joined
May 25, 2013
Messages
677
I would use the BeforeUpdate of the form and use either ISNULL() or NZ() functions.
 

Forum statistics

Threads
1,077,896
Messages
5,337,057
Members
399,120
Latest member
Sravankumar

Some videos you may like

This Week's Hot Topics

Top