theunknownknight
MIS
Below is a function that I'm writing in a module that will validate the info entered into my form. As Soon as I hit any code referring to the form variable, I get the error "Object variable or With block Variable not set".
I'm assuming its because I'm not setting the form object right. How do I do that?
Thanks.
Public Sub AreFieldsValid()
Dim Form As Form_Remittance
Dim db As Database
Dim rs As Recordset
Set db = CurrentDb()
Set rs = db.OpenRecordset("Remittance"
If Form.Remitter = "" Then
Form.Remitter.SetFocus
MsgBox "Enter a Remitter"
Else
End If
I'm assuming its because I'm not setting the form object right. How do I do that?
Thanks.
Public Sub AreFieldsValid()
Dim Form As Form_Remittance
Dim db As Database
Dim rs As Recordset
Set db = CurrentDb()
Set rs = db.OpenRecordset("Remittance"
If Form.Remitter = "" Then
Form.Remitter.SetFocus
MsgBox "Enter a Remitter"
Else
End If