Distinction between using .text and .value in VBA Access -


I have a textbox1.text value in a query and sometimes in a string : combor1 = comboReason1.Value << code>

Besides, why do I need to set the focus to control my property context? I do not understand this.

In addition, when I set combor4 = comboReason4.Value and .value is zero, then I get the invalid use of zero An error about

  • "text" tells you what appears on
  • "Value" gives you the underlying value

Both generally give the same results, except that the related control

  1. is a combbox or listbox control
  2. The displayed value is different from the bound column

Example:

  • id_Person is a Cambodian control
  • In line
  • Rorsource is "SELECT id_Person, personName FROM Tbl_Person"
  • A The width is "0cm; 3cm"
  • bound column 1
  • >

In this case:

  • id_Person.text displays Tbl_Person .personName
  • Displays id_Person.value Tbl_Person.id_Person.

.text property is available only when related control is F. Ocus.

.text is a string value, so it can not be taped, while .value can be null

edit: .text can only be said when Control has a focus, while .value can be said at any time ...


Comments