View Full Version : passing control


bry
10-08-2001, 02:23 AM
Hi,
Can anyone help - I need to pass control from a subform to the main form when the field is null.

this is what ive got so far, the first part works but the reference to the field i want to jump to, will not work?

Jack Cowley
10-08-2001, 11:11 AM
Try this in the On Exit event of the field in the subform:

If IsNull(SubFormField) Then [Forms]![MainFormName]![ControlName].SetFocus

Put in the appropriate field and form names.

bry
10-09-2001, 02:48 AM
Hi Jack,
I still cant get it to work, i get does not support property or method. If i leave the "Me." out it just crashes.

Thanks anyway,
bry.

Private Sub Pipe_Material_Exit(Cancel As Integer)
If IsNull(Me.[pipe material description]) Then [Forms]![Network data form_2]![network data info source].SetFocus
'If IsNull(SubFormField) Then [Forms]![MainFormName]![ControlName].SetFocus
End Sub