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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Me.Form.Name

Status
Not open for further replies.

Melagan

MIS
Nov 24, 2004
443
US
Greetings,

I use Me.Form.Name to capture a form's name all throughout my projects and it normally works fine. I encountered one this morning, though, that would not compile. It errored to a line where I was populating a global variable with Me.Form.Name. Ofcourse I don't remember the specific error..duh! However, upon restarting the database, it compiled just fine. Do you suppose it could have been a momentary loss of reference?

...confusing

Thanks!

~Melagan
______
"It's never too late to become what you might have been.
 
ah ha! I just got it again. The error is:

Method or data member not found.

Me.Form.Name where .Form is highlighted.

~Melagan
______
"It's never too late to become what you might have been.
 
Oh brother...I hope no one has wasted any time on this. Hold the phones, stop the horses! I saved a form as a report and discovered that it saves everything including code. Obviously, Me.Form.Name in a report object would error.

I'm gonna get another cup of coffee =)

~Melagan
______
"It's never too late to become what you might have been.
 
Me is a reference to the form. Don't you just want

Me.Name?
 
Golem said:
" ... Me is a reference to the form ... "

Actually "ME." refes to the Object and can be either a form or report ... The use of Me.[Form | Report] is redundant and should be shortened (to oomit .[Form | Report])




MichaelRed


 
I see - thank you both for the clarification; I will see about introducing this standard to my coding practices =)

~Melagan
______
"It's never too late to become what you might have been.
 
Actually "Me" refers to the instantiated object of the class module. Can be use in any class module not just forms and reports. A form or reports module is a special class module.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top