C
CJ
This was originally posted on September 14, 2007. "Test Linked form for
data"
Hi Groupies
How can I test to see if a linked form, that might not be visible, has data?
My main form has a yes/no box that enables a button when it is set to yes.
The button opens a linked form. When the user moves to the next record, I
would like the main forms BeforeUpdate event to make sure that the yes/no
box is not set at No while there is data in the linked form for that record.
I have tried something like:
If Me.Form.frmVehicles.RecordsetClone.RecordCount > 0 And Me.CompanyVehicle
= False Then
Cancel = True
MsgBox "Please check vehicles", vbOKOnly
Me.frmVehicles.Visible = True
End If
When I test it, things just hang up. Any ideas?
data"
Hi Groupies
How can I test to see if a linked form, that might not be visible, has data?
My main form has a yes/no box that enables a button when it is set to yes.
The button opens a linked form. When the user moves to the next record, I
would like the main forms BeforeUpdate event to make sure that the yes/no
box is not set at No while there is data in the linked form for that record.
I have tried something like:
If Me.Form.frmVehicles.RecordsetClone.RecordCount > 0 And Me.CompanyVehicle
= False Then
Cancel = True
MsgBox "Please check vehicles", vbOKOnly
Me.frmVehicles.Visible = True
End If
When I test it, things just hang up. Any ideas?