Stang70Fastback
Registered User.
- Local time
- Today, 06:49
- Joined
- Dec 24, 2012
- Messages
- 132
Question guys: When is it appropriate to use the '.Value' property in your code? I'm OCD about keeping code as neat as possible, and I started wondering if I was doing things properly. For example, when referring not to a control, but a field in a linked table, which is the "correct" form to use? (Both work!)
or
There are lots of instances where I am either calling a value, or setting a value, and in both cases, up until now I was using the '.Value' property, but I'm starting to wonder if that is unnecessary. If you just reference the field, does Access automatically know you're referring to its property? When WOULD you use .Value, and when wouldn't you? Or should you always use it for good measure? Someone school me!
Thanks!
Code:
Me.ModifiedTimestamp.Value = Now()
If Me.ModifiedTimestamp.Value = XYZ Then
or
Code:
Me.ModifiedTimestamp = Now()
If Me.ModifiedTimestamp = XYZ Then
There are lots of instances where I am either calling a value, or setting a value, and in both cases, up until now I was using the '.Value' property, but I'm starting to wonder if that is unnecessary. If you just reference the field, does Access automatically know you're referring to its property? When WOULD you use .Value, and when wouldn't you? Or should you always use it for good measure? Someone school me!
Thanks!