Re: Me. vs Me!
From: solex (solex_at_nowhere.com)
Date: 06/04/04
- Next message: Mike Harrington: "E-Mail Attachments"
- Previous message: solex: "Re: obtaining file size"
- In reply to: Derek Wittman: "Re: Me. vs Me!"
- Next in thread: Derek Wittman: "Re: Me. vs Me!"
- Reply: Derek Wittman: "Re: Me. vs Me!"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 4 Jun 2004 10:01:43 -0400
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: Mike Harrington: "E-Mail Attachments"
- Previous message: solex: "Re: obtaining file size"
- In reply to: Derek Wittman: "Re: Me. vs Me!"
- Next in thread: Derek Wittman: "Re: Me. vs Me!"
- Reply: Derek Wittman: "Re: Me. vs Me!"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|