I
Ian Baker
Hi - Using A2003 in A2000 format I have a form (bound to a query) with a
subform (also bound to a query). The main form has an unbound check box
(ctlAuthorised) that when clicked I need it to check to see if all the
records in the subform have an entry in a field "CategoryID". Here is my
code:
Dim rst As Recordset
Set rst = Me!subAccountPayable.Form.RecordsetClone
rst.FindFirst "CategoryID Is Null"
If rst.NoMatch = False Then
ctlAuthorised = False
MsgBox "Please enter or select a category for each of the items.", _
vbExclamation, "Missing Category"
End If
rst.Close
Set rst = Nothing
If I step through the code it works ok but if I don't the msgbox is "not
displayed" although the msgbox has been initiated thereby hanging the app
until I press Enter.
subform (also bound to a query). The main form has an unbound check box
(ctlAuthorised) that when clicked I need it to check to see if all the
records in the subform have an entry in a field "CategoryID". Here is my
code:
Dim rst As Recordset
Set rst = Me!subAccountPayable.Form.RecordsetClone
rst.FindFirst "CategoryID Is Null"
If rst.NoMatch = False Then
ctlAuthorised = False
MsgBox "Please enter or select a category for each of the items.", _
vbExclamation, "Missing Category"
End If
rst.Close
Set rst = Nothing
If I step through the code it works ok but if I don't the msgbox is "not
displayed" although the msgbox has been initiated thereby hanging the app
until I press Enter.