Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help in Access XP with accessing Forms from other Forms 1

Status
Not open for further replies.

russeldraper

Technical User
Jul 9, 2003
10
0
0
US
I'm working with an Access project and I'm trying to access a Forms variables from another Form with the statement:

Me.txtPolicyNumber = Forms!FrmPolicyInfo.txtPolicyUnbound

But this statement and others like it give me the following error:

Run-time error '2450':
Big Ben can't find the form 'FrmPolicyInfo' referred to in a macro expression or Visual Basic code.

This is confusing to me because I have a Form called FrmPolicyInfo, but my program isn't finding it. Can anyone help?

russeldraper
 
Your message is stating that the form is not currently open. The Forms collection only contains with the forms that are currently on the screen.

Take care,
--Shaun

"I wish that my room had a floor; I don't care so much for a door.
But this crawling around without touching the ground is getting to be quite a bore!" -- Gelett Burgess
 
Don't close your form frmpolicyinfo - just make it invisible. "me.visible = false" after the docmd.openform that has the txtpolicynumber field on it.

I am assuming that you are opening your txtpolicynumber form from the frmpolicyinfo form with a button click??
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top