I went into the Form wizard and created a Master/Detail form. I want to take the connection string out of the properties of the ADO Data Control and put them into the program (i.e. when the form loads), thus making it look something like:

private Sub Form_Load()
datPrimaryRS.ConnectionString = "MSDataShape;Data PROVIDER=MSDASQL;dsn=Exchange;uid=;pwd=;"
set grdDataGrid.DataSource = datPrimaryRS.Recordset("ChildCMD").UnderlyingValue
End Sub




But this doesn't seem to work and I get an error of "Data error event hit err:[Microsoft][ODBC Driver Manager]Data source name not found and no default driver specified."

What should this look like? Any help greatly appreciated.