Hi! I got this problem!
I have 2 forms. A main form and an extended form. I want to pass data from a field in the extended form to main form and save it in the main table. So the field's name in the extended form is: txtBDiluentLot, the name of the main form: BondSparF and the name of the extended form is BondDiluentF. I have written a code:
Private Sub StängKnappen_Click()
Me.Refresh
If IsNull(txtBDiluentLot) Then
'do nothing
Else
Forms![BondSparF form].Form.[BondDiluentF].Form.txtBDiluentLot = Me.BDiluentID
Forms![BondSparF form].Form.[BondDiluentF].Form.txtBDiluentLot.Me.SetFocus
End If
DoCmd.Close
End Sub
.... But when I run it it says: Run-time error: 2450
Microsoft Access cannot find the referenced form "BondSparF form".
Why I can't run it???
Thanks a lot!
I have 2 forms. A main form and an extended form. I want to pass data from a field in the extended form to main form and save it in the main table. So the field's name in the extended form is: txtBDiluentLot, the name of the main form: BondSparF and the name of the extended form is BondDiluentF. I have written a code:
Private Sub StängKnappen_Click()
Me.Refresh
If IsNull(txtBDiluentLot) Then
'do nothing
Else
Forms![BondSparF form].Form.[BondDiluentF].Form.txtBDiluentLot = Me.BDiluentID
Forms![BondSparF form].Form.[BondDiluentF].Form.txtBDiluentLot.Me.SetFocus
End If
DoCmd.Close
End Sub
.... But when I run it it says: Run-time error: 2450
Microsoft Access cannot find the referenced form "BondSparF form".
Why I can't run it???
Thanks a lot!