Results 1 to 4 of 4
  1. #1
    2 Star Lounger
    Join Date
    Feb 2001
    Posts
    107
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Finding a record within a recordset

    I use "dim rstFind as Recordset" in first line of Form_Open procedure, but when the procedure gets to the line rstFind=Me.Recordsetclone, I get the error "type mismatch".

    Huh? Using Access2000, I'm trying to get Form2 to open on click from Form1 on the same record as Form1 (using findfirst...which Access would not allow me to use as a method of rstFind). Any help appreciated.

  2. #2
    Stumper
    Guest

    Re: Finding a record within a recordset

    Couldn't your macro use condition 'where [recordID]=[Forms]![FORM1]![recordID]?

  3. #3
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Tennessee
    Posts
    194
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Finding a record within a recordset

    have you tried setting the criteria of form 2 to something like the id or autonumber field of form 1 then when you open form 2 it will have the same record

  4. #4
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Finding a record within a recordset

    Because a recordset is an object, you have to use the Set keyword to assign it to an object variable, otherwise you get a type mismatch. Try this:

    Set rstFind = Me.RecordsetClone
    Charlotte

Posting Permissions

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