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.png
    upload_2017-8-8_21-12-9.png
    7.8 KB · Views: 121

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top