me! Question

  • Thread starter Thread starter adriany
  • Start date Start date
A

adriany

I'm new to access in 5 years, I just discovered Me!

can anyone explain Me! and usage?

all fancy stuff i can use for?

adrian
 
When you are working in the module of a form (or report), Me is a reference
to the form/report.

If the form is name "Form1", you can think of Me as
Forms!Form1
A text box named Text1 on this form is therefore:
Me.Text1

The "Me" reference is faster to execute than the Forms reference, as it is
already open and resolved. More importantly, it still works even if the form
is renamed. More importantly still, the Intellisense knows the names of all
the controls on the form, and what kinds of objects they are. This
dramatically reduces the chances for errors: not only are you less likely to
spell an object wrongly if Access completes the names, but Access catches
such an error at compile time rather than runtime.
 
adriany said:
I'm new to access in 5 years, I just discovered Me!

can anyone explain Me! and usage?

all fancy stuff i can use for?


Me represents the class object containing the executing
code, most commonly a form or report's code module. It's a
more portable form of Forms!myform that's easier to read and
to type.

There are only a few situations where it's actually
required, but it is a good idea to use it anyway since it
helps to qualify the following name so you don't confuse it
with the name of some other item.
 
Back
Top