|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Accessing a rowsource value
I have code that sets the rowsouce of a list box based on a selection of a combo box. The rowsouce in code is equal to the sql string. However I would like to get to the actual value that is displayed in my list box. I tried ...me.mylistbox.value but it didn't work. Any thoughts or references that someone might point me to?
Thanks kenny |
|
#2
|
|||
|
|||
|
dim strValue as string
strValue = "Select [primaryKeyID Fieldname],[fieldName] from [tableName]" combobox.rowsource = strValue If you have more than one fieldname in your select statement then you need to set The column count property to the number of fields you have (even if you don't want to view it in your combobox) then set Column widths to something like this: 0";1" |
|
#3
|
|||
|
|||
|
Actually I was looking for the value that the sql str was pointing to in the table. I finally figured it out...
me.mylistbox.column(column,row) Thanks for your response. |
![]() |
| Viewing: ASP Free Forums > Database > Microsoft Access Help > Accessing a rowsource value |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|