TURNERMICH
Technical User
I have set up a form using the wizard, use an access database as the source.
The Resultant Connection String Adodc1 control is>
PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=C:\aaa\xxx.mdb;
-------
I have set up variable mdblocation and say have the value c:\bbb
Private Sub Form_Load()
With Adodc1
.ConnectionString = "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=" & MdbLocation & "xxx.mdb;"
.CommandType = adCmdText
.RecordSource = "Select * from types"
.Refresh
End With
End Sub
---------------
The above code in the form_load does not override the setting in the original form created.
---------------
The Resultant Connection String Adodc1 control is>
PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=C:\aaa\xxx.mdb;
-------
I have set up variable mdblocation and say have the value c:\bbb
Private Sub Form_Load()
With Adodc1
.ConnectionString = "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=" & MdbLocation & "xxx.mdb;"
.CommandType = adCmdText
.RecordSource = "Select * from types"
.Refresh
End With
End Sub
---------------
The above code in the form_load does not override the setting in the original form created.
---------------