C
Corey
I have a list box that I want to base its rowsource on an ADO recordset. The
user selects a Customer Number then the query goes to the server and looks up
the relevant information and displays it in the list box.
I have successfully done this using:
a. local tables
b. ODBC linked tables
c. populating a value list from the ADO recordset
However, I would like to base the rowsource directly on the ADO recordset.
Does anyone have any ideas? The list keeps coming back empty, no error is
reported. I use the same SQL to populate the value list...
Code:
stSQL = "SELECT PRKEY, PFCT1, PSDTE, PSEDT INTO TMP_ESP " & _
"FROM PPCS82F.ESPL01 " & _
"WHERE PRKEY LIKE '%" & Me!Customer & "' " & _
"AND PMETH='1' " & _
"ORDER BY PRKEY"
rsESP.Open stSQL, cn
Me!lbMeth4.RowSource = stSQL
user selects a Customer Number then the query goes to the server and looks up
the relevant information and displays it in the list box.
I have successfully done this using:
a. local tables
b. ODBC linked tables
c. populating a value list from the ADO recordset
However, I would like to base the rowsource directly on the ADO recordset.
Does anyone have any ideas? The list keeps coming back empty, no error is
reported. I use the same SQL to populate the value list...
Code:
stSQL = "SELECT PRKEY, PFCT1, PSDTE, PSEDT INTO TMP_ESP " & _
"FROM PPCS82F.ESPL01 " & _
"WHERE PRKEY LIKE '%" & Me!Customer & "' " & _
"AND PMETH='1' " & _
"ORDER BY PRKEY"
rsESP.Open stSQL, cn
Me!lbMeth4.RowSource = stSQL