|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
display lookup column 2 data
Hello. Can this be done?
I have an ASP page displaying my Access database record: <%= rstDBEdit.Fields("forms_desc").Value %> This displays the data in hidden bound column 1, which are numbers. How do I display the more meaningful column 2 data? It shows just fine inside the database, as column 1 is hidden. The Lookup RowSource in my Forms table is: SELECT DISTINCTROW insco.insco_id AS Expr1, insco.insco_name AS Expr2 FROM insco; Insco_id is the number - the insco_name displays the corresponding name right inside the Forms table. It is this info that I want to display to the user. Display Control = Combo Box Row Source Type = Table/Query Bound Column = 1 Column Count = 2 Coumn Widths = 0";1" List Rows = 8 List Width = 1" Limit To List = Yes Any ideas? I can't change the database at this point, need to extract via asp... ??? Pamela |
|
#2
|
|||
|
|||
|
from what I can gather you're not specifying the right field. instead of
<%= rstDBEdit.Fields("forms_desc").Value %> you want <%= rstDBEdit.Fields("Expr2").Value %> you don't have a field called forms_desc so I don't even know what it's showing you. you can also write a two instead of expr2 but I dont' recomend it. using the name of the field is better. |
|
#3
|
|||
|
|||
|
Thanks for replying so quickly!
I'm sorry, I failed to mention that <%= rstDBEdit.Fields("forms_desc").Value %> corresponds to the database field forms_desc that holds the rowsource lookup query. Displaying the forms_desc field inside my forms table inside the mdb displays the bound column 1 info, which looks like it should evaluate to Expr1. But I tried that anyway, tried <%= rstDBEdit.Fields("Expr1").Value %> and <%= rstDBEdit.Fields("Expr2").Value %> but all I got were 0's, not the Column2 data names. Any other thoughts or glaring errors? Thanks!! Pamela |
|
#4
|
|||
|
|||
|
How to get to the unhidden column2 data residing in the lookup query residing in the forms_desc field?
<%= rstDBEdit.Fields("forms_desc").[0,1].Value %> Any ideas on the syntax? This is driving me mad. Pamela ![]() |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > display lookup column 2 data |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|