newbie question about controls

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.
 
C

Cheval

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.
 
D

Doom

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
 
C

Cheval

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top