K
Keith G Hicks
I have a public procedure that checks the values of several fields in a
table before the calling routine can do further processign. The procedure
can be called from a couple of places. First it can be called from the form
itself where the fields are bound to the controls on the form. Second it can
be called by another procedure that sets up the same fields in a recordset
(not part of a form).
Here's the idea:
Public Sub subStatus(obj as ???)
If IsNull(obj!Field1) Then
strMissingFields = strMissingFields & vbCrLf & " Field 1"
End If
If IsNull(obj!Field2) Then
strMissingFields = strMissingFields & vbCrLf & " Field 2"
End If
If IsNull(obj!Field3) Then
strMissingFields = strMissingFields & vbCrLf & " Field 3"
End If
table before the calling routine can do further processign. The procedure
can be called from a couple of places. First it can be called from the form
itself where the fields are bound to the controls on the form. Second it can
be called by another procedure that sets up the same fields in a recordset
(not part of a form).
Here's the idea:
Public Sub subStatus(obj as ???)
If IsNull(obj!Field1) Then
strMissingFields = strMissingFields & vbCrLf & " Field 1"
End If
If IsNull(obj!Field2) Then
strMissingFields = strMissingFields & vbCrLf & " Field 2"
End If
If IsNull(obj!Field3) Then
strMissingFields = strMissingFields & vbCrLf & " Field 3"
End If