Hello everyone,
I'm working on a code snippet in order to save my useform entry into my Access sheet. The code is

HTML Code:
Next ctrl

    If IsNull(str) Or str = "" Then

        MsgBox("Record Saved")

    DoCmd.RunCommand acCmdSaveRecord -- line that is highlighted when code errors out.


        MsgBox"Please enter data for all required fields." & vbNewLine & _

        String(52,"-") & vbCrLf & str, vbInformation + vbOKOnly, "Error -Required Fields Missing"

 End If

Thank you in advance