Results 1 to 2 of 2
  1. #1
    4 Star Lounger
    Join Date
    Feb 2001
    Location
    Louisville, Kentucky, USA
    Posts
    597
    Thanks
    0
    Thanked 0 Times in 0 Posts

    rs.FindFirst (A2K)

    I should know this but don't...I simply don't.

    I need to find a record on the form based on column0, (numeric) and column2 (text) of a combo box. No matter what I do, I get a data mismatch error. Can someone please help?

    I'm using the following code:

    rs.FindFirst "[Member_ID] = '" & Me![cboMemberSearch].Column(0) & "'" & "And [ID] = '" & Me.[cboMemberSearch].Column(2) & "'"
    If Not rs.EOF Then Me.Bookmark = rs.Bookmark

    In debug, I can get the correct value for column2 but not column0.

    Someone PLEASE SAVE ME!!!

    Thanks in advance.
    Roberta Price <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 18 Times in 18 Posts

    Re: rs.FindFirst (A2K)

    Try
    <code>
    rs.FindFirst "[Member_ID] = " & Me![cboMemberSearch].Column(0) & " And [ID] = '" & Me.[cboMemberSearch].Column(2) & "'"
    </code>
    Since column 0 is numeric, there shouldn't be quotes (single or double) around the value.
    Instead of rs.EOF I'd use rs.NoMatch.

Posting Permissions

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