Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ADODC Controls - change Recordsource

Status
Not open for further replies.

Dauphy

IS-IT--Management
Nov 8, 2001
111
CA
Hi! I have a set of ADODC controls in a form and an option control array. When I select a specific option (depending on the option), I want the recordsource to change and the corresponding datalist to update.


Select Case Index
Case 0
strFileSummary = "Select * from cornSummary"
strFileDetail = "Select * from cornDetail"
adcSummary.RecordSource = strFileSummary
adcDetail.RecordSource = strFileDetail
adcSummary.Refresh
adcDetail.Refresh

Case 1
strFileSummary = "Select * from SoySummary"
strFileDetail = "Select * from SoyDetail"
adcSummary.RecordSource = strFileSummary
adcDetail.RecordSource = strFileDetail
adcSummary.Refresh
adcDetail.Refresh
End Select

I can't get past the refresh of the controls to refresh the datalists. Thanks for your help


 

> I can't get past the refresh of the controls to refresh the datalists

What do you mean? After getting the data into the ADODC you have problems showing the data in the DataList?
Do the DataLists show data at first, and then when refreshing the ADODCs, the lists do not change? Or what? [/b][/i][/u]*******************************************************
General remarks:
If this post contains any suggestions for the use or distribution of code, components or files of any sort, it is still your responsibility to assure that you have the proper license and distribution rights to do so!
 
Try writing Set before the lines with the DataSource

Set adcSummary.DataSource=strFileSummary
 

golandsh: What do you mean by this?
A DC does not have a DataSource property, and the RecordSource property is not an object, so you cannot Set it.... [/b][/i][/u]*******************************************************
General remarks:
If this post contains any suggestions for the use or distribution of code, components or files of any sort, it is still your responsibility to assure that you have the proper license and distribution rights to do so!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top