var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Can't change the record source of an ADO data control, help!!!
I'm trying to change the RecordSource property of an ADO data control (ADODC) in VB.
I've written a function that passes in a string and tries to assign the value of the RecordSource property to that string, as so:
(where DataGrid is the form name and dcDataSheetSource is the name of the ADO data control)
Public Sub ChangeDataSource(strsql As String)
DataGrid.dcDataSheetSource.RecordSource = strsql
Here's how I'm calling it in testing in the click event of a test button:
There are no errors or anything; it just plain never updates the record source. What am I doing wrong? Thanks!
Private Sub cmdTest1_Click()
Dim strsql As String
strsql = "EXEC sp_FESpecialPipelineReport @Filter=''"
This seems to work, though I don't know why.
Public Sub ChangeDataSource(strSQL As String)
.dcDataSheetSource.CommandType = adCmdText
.dcDataSheetSource.RecordSource = strSQL