opening recordsets

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Geoff

    #1

    opening recordsets

    The below code generates a run time error 13 on last line .. 'type mismatch'
    but why??

    (Yes I have checked the spelling of table TblPass )



    Dim Db As Database

    Dim Rec As Recordset



    Set Db = CurrentDb()

    Set Rec = Db.OpenRecordse t("TblPass", dbOpenDynaset) ß



    many thanks



    geoff


  • PC Datasheet

    #2
    Re: opening recordsets

    You need to go to References and uncheck MS ADO and check MS DAO. Then change
    your Dim statements to:
    Dim Db As DAO.Database

    Dim Rec As DAO.Recordset


    --
    PC Datasheet
    Your Resource For Help With Access, Excel And Word Applications
    resource@pcdata sheet.com



    "Geoff" <g.friar@ntlwor ld.com> wrote in message
    news:RKxUb.4835 2$OA3.15174854@ newsfep2-win.server.ntli .net...[color=blue]
    > The below code generates a run time error 13 on last line .. 'type mismatch'
    > but why??
    >
    > (Yes I have checked the spelling of table TblPass )
    >
    >
    >
    > Dim Db As Database
    >
    > Dim Rec As Recordset
    >
    >
    >
    > Set Db = CurrentDb()
    >
    > Set Rec = Db.OpenRecordse t("TblPass", dbOpenDynaset) ß
    >
    >
    >
    > many thanks
    >
    >
    >
    > geoff
    >
    >[/color]


    Comment

    Working...