Access can't find the form 'FormName' reffered to in macro express of vb code
The code in the form that calls the function is:
Check_Req_Fields "tbAddDocument"And the code in the function:
Function Check_Req_Fields(FormName As String)
For Each ctrl In Forms!FormName.Controls
If TypeName(ctrl) = "TextBox" Then
If ((IsNull(ctrl.Value)) Or ctrl.Value = "") And (ctrl.Tag = "req") Then
err = err + 1
MsgBox "Please enter a value for " & ctrl.Name
Exit For
End If
End If
Next ctrl
Thank You