>I'm trying to bind a RDC in code so I cant get rid of the ODBC manager dialog. If I set every thing in the control, after I pick the DB I'm fine.
>Here is what I have in my form.load:
> sConn = "ODBC;Database=d:\data\accounting.mdb;" _
> & "UID;PWD;DSN=MS Access;"
> Me.MSRDC1.Connect = sConn
> Me.MSRDC1.DataSourceName = "MS Access"
> Me.MSRDC1.Prompt = rdDriverNoPrompt
> Me.MSRDC1.sql = DU.BuildSqlStmt(mSql)
> Me.MSRDC1.Refresh
Isn't it the table name that goes into the DataSourceName property?
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com