Hi Phucon
In addition, for a combo box the Text property returns the text being displayed in the combo box (the first column with a non-zero width), while the Value property returns the value of the bound column, which is often a hidden primary key or such-like.
Note that in an Access form (unlike VB6) the Text property is only available while a control has the focus. It is especially useful in the Change event, or when programmatically selecting a portion of text in the control.
By the time you get to BeforeUpdate, the Value property can be used, because it has been set to the new value, although it has not been "updated" so the change can easily be cancelled.
Hoping this clears things up :-)
-- Graham
From: MS_Access_Professionals@yahoogroups.com [mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of Bridgham, Jeff E.
Sent: Wednesday, 11 December 2013 07:18
To: MS_Access_Professionals@yahoogroups.com
Subject: RE: [MS_AccessPros] How and what is different between the TEXT and Value porperties of a combo box
The text property shows what is currently being typed into the box, which only becomes the value after the user tabs out of the box, or leaves it some other way. One reason to use the text value would be to test the entry in the BeforeUpdate event.
Jeff
From: MS_Access_Professionals@yahoogroups.com [mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of saigonf7q5@yahoo.com
Sent: Tuesday, December 10, 2013 1:13 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] How and what is different between the TEXT and Value porperties of a combo box
A combo box has TEXT property and VALUE property. What is the different between the 2 properties? It will be good to have an example when to use which. Access Help does not help much.
Thanks
Phucon.
[Non-text portions of this message have been removed]
| Reply via web post | Reply to sender | Reply to group | Start a New Topic | Messages in this topic (3) |
Tidak ada komentar:
Posting Komentar