Re: Me. vs Me!

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: solex (solex_at_nowhere.com)
Date: 06/04/04


Date: Fri, 4 Jun 2004 10:46:27 -0400

Derek,

You are correct!

Dan

"Derek Wittman" <anonymous@discussions.microsoft.com> wrote in message
news:8F679D88-4959-4291-8081-EE1FD0697621@microsoft.com...
> Dan,
> This is great information. Very helpful. So, if I use me.ctrlname, I
need to make sure I use me.ctrlname.value (the property), if I understand
correctly. Of course, I could always set a variable to be equal to
me.ctrlname or me.ctrlname.value, right?
>
> Thanks!
> Derek
>
> ----- solex wrote: -----
>
> Derek,
>
> Me always refers to the class period. Since your form is a class
when ever
> you refer to me you are point to the class. So if you have a control
on
> your form you would refer to the value of the control like this:
>
> Me.MyControl.Value = "jfkldfj"
>
> When you execute me.Refresh you are asking the form to refresh its
> underlying datasource. So if you have controls that are based on
other
> controls your syntax would look something like this:
>
> Private Sub cmb1_AfterUpdate()
> me.cmb2.Value = me.cmb1.Value
> End Sub
>
>
> "Derek Wittman" <anonymous@discussions.microsoft.com> wrote in
message
> news:167EEB96-E939-4612-92E1-C639EC692CD7@microsoft.com...
> > Thanks, Dan. I have a small handful combo boxes that are based on
one
> another's values, so I use Me.Refresh in my AfterUpdate event
procedures a
> lot.
> >> But I can never get the Me. syntax to successfully represent a
form
> control's value...
> >> Thanks!
> > Derek
> >> ----- solex wrote: -----
> >> Derek,
> >> First and foremost forms as fully qualified classes.
> >> I use the bang symbol "!" only when using the implicit
objects such
> as
> > [Forms], [Reports] etc which represent a collection of other
objects
> in the
> > property inspectors.
> >> You use the Me. syntax when refering to a property,
subroutine or
> function
> > from within the class module.
> >> Regards,
> > Dan
> >>>>> "Derek Wittman" <anonymous@discussions.microsoft.com>
wrote in
> message
> > news:AF58A59E-34D7-4FA2-A8F3-F639055A0BBA@microsoft.com...
> >> Good morning,
> >> I know I saw something in the last few days on this topic, but I
> lost it.
> > I continue to have to reference form controls like
> > Forms!frmFORMNAME.controlname rather than (from form code)
> Me!controlname or
> > Me.controlname.
> >>> I did some hunting in the help files and they suggest that the
Me!
> or Me.
> > syntax may only be used in a class module (which I don't
believe this
> > qualifies as).
> >>> Can someone please help me out?
> >> Thank you!
> >> Derek
> >>>



Relevant Pages

  • Re: Setting values
    ... Thanks for the reply Dan. ... I noticed Me.xxx alot in the posts. ... "Dan Artuso" wrote: ... > It's sometimes important to distinguish between controls on your form and fields in your ...
    (microsoft.public.access.formscoding)
  • Re: DB drop down list on delphi.net 8
    ... Dan: ... I can't find the controls you ... recommended in delphi 8 except for the TlistBox. ... Use one of the event handlers for the ...
    (comp.lang.pascal.delphi.databases)
  • Re: Persist viewstate for children created with ITemplate
    ... "Dan" wrote: ... I have been building a custom collapsible panel control, ... controls from my ITemplate) and OnInit. ... of the dotnet groups such as microsoft.public.dotnet.framework.aspnet or ...
    (microsoft.public.inetserver.asp.components)
  • RE: Combo Box question
    ... Sorry, Dan, I got a bit lost in this. ... The names of the controls on the form. ... Which column in the combo box is the bound column? ... But first field is the text that is displayed when selecting the ...
    (microsoft.public.access.forms)
  • Re: Me. vs Me!
    ... you refer to me you are point to the class. ... So if you have controls that are based on other ... controls your syntax would look something like this: ...
    (microsoft.public.access.modulesdaovba)