Examples of where .Value is required?
This probably could go in a few forums but I just picked this general one. For quite some time I've wondered just how many places .Value is required in Access. Now that I've got a few in mind I thought I'd see if anyone can add to the list. Here's what I've come up with (some using the immediate window):
1)
If you want to know the data type that a form control contains:
?typename(forms!form3.[lastname].Value)
String
Otherwise, the control type will be returned:
?typename(forms!form3.[lastname])
TextBox
2)
If you drill down to a form control and test/set a bunch of properties but also want to know what it contains (not its Text property):
Code:
With Me.myControl
.Backcolor = vbYellow
.ForeColor = vbBlack
.Value = "Test"
End With
I suppose for #2 there might be a way around it, but the above would seem the most efficient and practical to me.
3)
If you need to apply query criteria to a multi value field. Since you usually would not know the mvf record index number:
WHERE mvf_Names.Value = "Sam"
I thought it would be required to get the value of a property but it doesn't seem to be.
Can anyone add to the list for Access?
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.