Error: sub form or function not defined

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am recieving an error message when I go to view a form about a subform that
contains contact information. The code is as follows:

Private Sub Form_Current()
Form_ [frmpeople_and_places].Recalc
Form_FrmInvestment1.Recalc
End Sub

The form name is correct, but it fails to recognize it. What should I do?
 
That's not how you refer to forms (it's how you refer to their modules)

Forms! [frmpeople_and_places].Recalc
Forms!FrmInvestment1.Recalc

or

Forms("frmpeople_and_places").Recalc
Forms("FrmInvestment1").Recalc
 
Thanks for your comment, it helped quite a bit! However, now I am recieving
error 2450 which says that
"Access can't find the form "frmpeople_and_places" referred to in a macro
expression or visual basic code"

What should I do now?

Douglas J. Steele said:
That's not how you refer to forms (it's how you refer to their modules)

Forms! [frmpeople_and_places].Recalc
Forms!FrmInvestment1.Recalc

or

Forms("frmpeople_and_places").Recalc
Forms("FrmInvestment1").Recalc



--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


Accesscontroller said:
I am recieving an error message when I go to view a form about a subform
that
contains contact information. The code is as follows:

Private Sub Form_Current()
Form_ [frmpeople_and_places].Recalc
Form_FrmInvestment1.Recalc
End Sub

The form name is correct, but it fails to recognize it. What should I do?
 
Forgive me for asking the obvious, but does the form to which you're
referring exist?

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


Accesscontroller said:
Thanks for your comment, it helped quite a bit! However, now I am
recieving
error 2450 which says that
"Access can't find the form "frmpeople_and_places" referred to in a macro
expression or visual basic code"

What should I do now?

Douglas J. Steele said:
That's not how you refer to forms (it's how you refer to their modules)

Forms! [frmpeople_and_places].Recalc
Forms!FrmInvestment1.Recalc

or

Forms("frmpeople_and_places").Recalc
Forms("FrmInvestment1").Recalc



--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


Accesscontroller said:
I am recieving an error message when I go to view a form about a subform
that
contains contact information. The code is as follows:

Private Sub Form_Current()
Form_ [frmpeople_and_places].Recalc
Form_FrmInvestment1.Recalc
End Sub

The form name is correct, but it fails to recognize it. What should I
do?
 
Yes, we had to recreate it after it corrupted. It's name is
people_and_places...

Douglas J. Steele said:
Forgive me for asking the obvious, but does the form to which you're
referring exist?

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


Accesscontroller said:
Thanks for your comment, it helped quite a bit! However, now I am
recieving
error 2450 which says that
"Access can't find the form "frmpeople_and_places" referred to in a macro
expression or visual basic code"

What should I do now?

Douglas J. Steele said:
That's not how you refer to forms (it's how you refer to their modules)

Forms! [frmpeople_and_places].Recalc
Forms!FrmInvestment1.Recalc

or

Forms("frmpeople_and_places").Recalc
Forms("FrmInvestment1").Recalc



--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


message I am recieving an error message when I go to view a form about a subform
that
contains contact information. The code is as follows:

Private Sub Form_Current()
Form_ [frmpeople_and_places].Recalc
Form_FrmInvestment1.Recalc
End Sub

The form name is correct, but it fails to recognize it. What should I
do?
 
If its name is people_and_places, why are you looking for
frmpeople_and_places?

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


Accesscontroller said:
Yes, we had to recreate it after it corrupted. It's name is
people_and_places...

Douglas J. Steele said:
Forgive me for asking the obvious, but does the form to which you're
referring exist?

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


Accesscontroller said:
Thanks for your comment, it helped quite a bit! However, now I am
recieving
error 2450 which says that
"Access can't find the form "frmpeople_and_places" referred to in a
macro
expression or visual basic code"

What should I do now?

:

That's not how you refer to forms (it's how you refer to their
modules)

Forms! [frmpeople_and_places].Recalc
Forms!FrmInvestment1.Recalc

or

Forms("frmpeople_and_places").Recalc
Forms("FrmInvestment1").Recalc



--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


in
message I am recieving an error message when I go to view a form about a
subform
that
contains contact information. The code is as follows:

Private Sub Form_Current()
Form_ [frmpeople_and_places].Recalc
Form_FrmInvestment1.Recalc
End Sub

The form name is correct, but it fails to recognize it. What should
I
do?
 
Back
Top