Hi guys, for some reason my code has stopped working. I get type mismatch on the line below
' Set rs = db.OpenRecordset("agents", dbOpenTable) '
There is defo a table named 'agents' - so unsure why it has stopped working.Code:Dim db As Database Dim rs As Recordset Dim ds As Recordset Dim WS As Workspace Set WS = DBEngine.Workspaces(0) dbfile = ("\\server\Database\maindb.mdb") pwdstring = "jj123" Set db = DBEngine.OpenDatabase(dbfile, False, False, ";PWD=" & pwdstring) Set rs = db.OpenRecordset("agents", dbOpenTable) <<<< This is the line that gets type mismatch
Thanks




Reply With Quote