Results 1 to 6 of 6
  1. #1
    Join Date
    May 2002
    Posts
    395

    Unanswered: "Type Mismatch" in recordset object variable

    Why do I get "Type Mismatch" in recordset object variable(rst)?

    This is what I have:
    Dim db As Database, rst As Recordset

    Set db = CurrentDb()
    Set rst = db.OpenRecordset("tblShipments")

    rst.MoveLast
    rst.AddNew

    The recordset was not stored in rst variable.
    Can anyone help?

    Thanks!

  2. #2
    Join Date
    Jul 2002
    Posts
    36
    don't know if this will work but try:

    dim rst as dao.recordset

  3. #3
    Join Date
    Oct 2002
    Location
    Inland Northwest(US)
    Posts
    19
    I stuck this line in a copy of your code and instead of
    Set db = CurrentDb()
    say
    Set db = DBEngine.Workspaces(0).Databases(0)
    When I tested it, it at least compiled.
    Good luck!
    Laeskia

  4. #4
    Join Date
    May 2002
    Posts
    395
    Thanks!
    I'll give it a try.
    Where is Inland Northwest at?

  5. #5
    Join Date
    Oct 2002
    Location
    Inland Northwest(US)
    Posts
    19
    United States(e Washington, Idaho Panhandle , Western half of Montana)
    I live in ID and go to school in WA

  6. #6
    Join Date
    May 2002
    Posts
    395
    Interesting!
    Thanks for the geography info.

Posting Permissions

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