P
pokdbz
I am getting an error right after: DoCmd.GoToRecord , , acNewRec
It is saying invalid use of null. Any ideas?
Private Sub Save_Click()
On Error GoTo Err_Save_Click
Dim checkSet1 As String
If Len(Me.SSN) = 9 Then
If MsgBox("Is this your correct Social Security Number " & SSN,
vbYesNo) = vbYes Then
DoCmd.GoToRecord , , acNewRec
'//////used to check Sets in the provider
table//////////////////////
checkSet1 = DLookup("SetB", "Provider", "SSN = '" & Me.SSN & "'")
'////////////////////////////////////////////////////////////////////
If checkSet1 = 1 Then
DoCmd.OpenForm ("PHQ")
End If
Else
MsgBox ("Please correct your Social Security number")
End If
Else
MsgBox ("Please enter your full Social Security number")
End If
Exit_Save_Click:
Exit Sub
Err_Save_Click:
MsgBox Err.Description
Resume Exit_Save_Click
End Sub
It is saying invalid use of null. Any ideas?
Private Sub Save_Click()
On Error GoTo Err_Save_Click
Dim checkSet1 As String
If Len(Me.SSN) = 9 Then
If MsgBox("Is this your correct Social Security Number " & SSN,
vbYesNo) = vbYes Then
DoCmd.GoToRecord , , acNewRec
'//////used to check Sets in the provider
table//////////////////////
checkSet1 = DLookup("SetB", "Provider", "SSN = '" & Me.SSN & "'")
'////////////////////////////////////////////////////////////////////
If checkSet1 = 1 Then
DoCmd.OpenForm ("PHQ")
End If
Else
MsgBox ("Please correct your Social Security number")
End If
Else
MsgBox ("Please enter your full Social Security number")
End If
Exit_Save_Click:
Exit Sub
Err_Save_Click:
MsgBox Err.Description
Resume Exit_Save_Click
End Sub