newbie question about controls

  • Thread starter Thread starter Doom
  • Start date Start date
D

Doom

Hi,

On a form, I have a textbox called txt_FirstName
Its Controlsource is FirstName, a field of a query which is the Recordsource
of my form.

Is there a difference between :

Me!txt_Firstname = "John"
and
Me.FirstName = "John"

Is it better to use the first one or the second one ?

Thanks for your comments.
 
Firstly, "Doom"? Did your mother not like you or something?

Secondly, Difference? Yes, if you want to see the change,
otherwise nope, you're fine to do that. I prefer to user
the dot notation either way as the compiler can catch and
errors at design time.
 
Cheval said:
Firstly, "Doom"? Did your mother not like you or something?

Secondly, Difference? Yes, if you want to see the change,
otherwise nope, you're fine to do that. I prefer to user
the dot notation either way as the compiler can catch and
errors at design time.
Ok thanks, I guess I need to add Me.Requery if I want to see the changes
when I use Me.FirstName
 
If you do that then you are moved to the beginning of the forms recordset
again. It's just better to use the control name rather than the field name.


Cheval said:
Firstly, "Doom"? Did your mother not like you or something?

Secondly, Difference? Yes, if you want to see the change,
otherwise nope, you're fine to do that. I prefer to user
the dot notation either way as the compiler can catch and
errors at design time.
Ok thanks, I guess I need to add Me.Requery if I want to see the changes
when I use Me.FirstName
 
Back
Top