Re: Me. vs Me!
From: solex (solex_at_nowhere.com)
Date: 06/04/04
- Next message: Ryan: "Loading comma-delimited string into array"
- Previous message: Anne: "Copying Value to Clipboard"
- In reply to: Derek Wittman: "Re: Me. vs Me!"
- Next in thread: Ted Allen: "Me. vs Me!"
- Messages sorted by: [ date ] [ thread ]
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
> >>>
- Next message: Ryan: "Loading comma-delimited string into array"
- Previous message: Anne: "Copying Value to Clipboard"
- In reply to: Derek Wittman: "Re: Me. vs Me!"
- Next in thread: Ted Allen: "Me. vs Me!"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|