No, maybe I was the one not clear enough, by setting the two properties as mentioned above, the returned value of the combobox will be the value in column 2, which is what you want as far as I can see. Mike Gagnon
If you want to get the best response to a question, please check out FAQ184-2483 first or check this link
ThisForm.myvar1 = This.Value
myVar1 = This.Value
IF myVar1 = This.Value
ThisForm.myVar2 = "Apple
ENDIF
IF myVar1 = This.Value
ThisForm.myVar2 = "Orrange"
ENDIF
...
etc..
and then use it to populate your field..
If you are using an SQL select for the combo.. Then..
using the CursorName.. and the field names you can also easily get all the row items values.
(1) Field1 (that has the combo box with two columns, eg "1","APPLE"...)
(2) At Field1, when the user select "1" from the combo, the value "1" will be store in Field1 (that is the default), but I also need to store "APPLE" in different field in the table, e.g. field2.
If you do as I suggested, the Value property of the combobox will be "apple" and the displayValue will be "1", you get both values:
So in the Valid use something like:
SELECT myTable
go bottom
append blank
replace field1 with this.displayValue
replace field2 with this.value
Mike Gagnon
If you want to get the best response to a question, please check out FAQ184-2483 first or check this link
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.