Ah, I see the problem. Try this connectino code instead. You don't have to use the same connection variables, but the syntax needs to be the sameYou have to declare them before you use them. Using New on a variable that has not yet been declared will result in the error that you received.VB Code:
Dim con As ADODB.Connection Dim ConnString As String ConnString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=c:\db1.mdb;" & _ "Persist Security Info=False" Set con = New ADODB.Connection con.ConnectionString = ConnString con.Open ConnString




Reply With Quote