Hi all,
Having this problem on a form when a button is clicked to launch another form and my code makes sure that the one of the fields on the form isn't empty/Null, I keep getting the error 'Invaild use of Null', but Access just doesn't seem to read it as a null in my code. See Below
Private Sub butAttach_Click()
If ARNo.Value = Null Then
MsgBox "Please enter an AR Number before adding a PDF document to the database", vbOKOnly, "Add A PDF Document"
Exit Sub
Else:
arnum = ARNo.Value <- THIS IS WHERE THE ERROR OCCURS
DoCmd.OpenForm "frmselect"
End If
End Sub
The field in question ARNo.Value has a control source which is set to number.
Am I doing something wrong here??
Cheers,
Ryan
Having this problem on a form when a button is clicked to launch another form and my code makes sure that the one of the fields on the form isn't empty/Null, I keep getting the error 'Invaild use of Null', but Access just doesn't seem to read it as a null in my code. See Below
Private Sub butAttach_Click()
If ARNo.Value = Null Then
MsgBox "Please enter an AR Number before adding a PDF document to the database", vbOKOnly, "Add A PDF Document"
Exit Sub
Else:
arnum = ARNo.Value <- THIS IS WHERE THE ERROR OCCURS
DoCmd.OpenForm "frmselect"
End If
End Sub
The field in question ARNo.Value has a control source which is set to number.
Am I doing something wrong here??
Cheers,
Ryan