Hello, I am a total newbie to vba and trying to learn on the job. I am trying to test if a value in one of my tables is null. If it is, I want to return an error message and ask the user if they want to continue. If it is not null, I don't want to see any error message and just continue the process. Any ideas what is wrong here:
If IsNull(NHSNASA) Then
Dim Response As VbMsgBoxResult
Response = MsgBox("At least 1 ASA Score is Missing. Do you want to continue?", vbQuestion + vbYesNo, "ALERT")
If Response = vbYes Then
MsgBox "You will not be able to upload data to NHSN until the missing ASA Scores are updated"
Else: DoCmd.CloseDatabase
End If
Else
End If
If IsNull(NHSNASA) Then
Dim Response As VbMsgBoxResult
Response = MsgBox("At least 1 ASA Score is Missing. Do you want to continue?", vbQuestion + vbYesNo, "ALERT")
If Response = vbYes Then
MsgBox "You will not be able to upload data to NHSN until the missing ASA Scores are updated"
Else: DoCmd.CloseDatabase
End If
Else
End If