Access Passing data from a form to another form!

Joined
Aug 8, 2017
Messages
1
Reaction score
0
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!
 

Attachments

  • upload_2017-8-8_21-12-9.webp
    upload_2017-8-8_21-12-9.webp
    5.4 KB · Views: 125
Back
Top