How can i change the property :
RecordSource
of a DATA CONTROL at runtime.
When i change the property and i call :
Refresh Method.
I receive an error :
Object doesn't not support this property or method.
Printable View
How can i change the property :
RecordSource
of a DATA CONTROL at runtime.
When i change the property and i call :
Refresh Method.
I receive an error :
Object doesn't not support this property or method.
Try this. After you modified the RecordSource property:
Data1.Recordset.Refresh
Regards,
------------------
Serge
Software Developer
[email protected]
[email protected]
ICQ#: 51055819
I receive an error when i try to refresh the Data1.
Private Sub Command1_Click()
On Error Resume Next
Data1.Recordset.Close
Data1.RecordSource = ""
Data1.RecordSource = "EMPLOYE"
Data1.Refresh
Data1.Recordset.Refresh
txtFirstName.DataField = ""
txtFirstName.DataField = "EMPL_FST_N"
End Sub
Private Sub Command2_Click()
On Error Resume Next
Data1.Recordset.Close
Data1.RecordSource = ""
Data1.RecordSource = "SUPERVIS"
Data1.Refresh
Data1.Recordset.Refresh
txtFirstName.DataField = ""
txtFirstName.DataField = "SUP_FST_NM"
End Sub