Results 1 to 8 of 8

Thread: Type Mismatch? Worked yesterday ?

Threaded View

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    May 2009
    Posts
    876

    Type Mismatch? Worked yesterday ?

    Hi guys, for some reason my code has stopped working. I get type mismatch on the line below

    ' Set rs = db.OpenRecordset("agents", dbOpenTable) '


    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
    There is defo a table named 'agents' - so unsure why it has stopped working.

    Thanks
    Last edited by JamieWarren09; Aug 15th, 2012 at 04:29 AM. Reason: password was shown

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width