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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Altering Adodc (Mdb) Source Directory at Runtime

Status
Not open for further replies.

TURNERMICH

Technical User
Apr 5, 2000
64
AU
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.

---------------

Would appreciate some help
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top