Results 1 to 1 of 1
  1. #1
    Join Date
    Mar 2004
    London and Nairobi

    Unanswered: Apostrophe's in list boxes

    I have a form which adds student information for schools. Once a student's name is entered it is populated into a List Box. If a name has an apostrophe, I cannot populate the form using the List Box when clicking on a name with an apostrophe. I get a 3077 runtime error.

    This is the code:

    Private Sub List11_AfterUpdate()
    ' Find the record that matches the control.
    Dim rs As Object

    Set rs = Me.Recordset.Clone
    rs.FindFirst "[NAME] = '" & Me![List11] & "'"
    Me.Bookmark = rs.Bookmark
    End Sub

    The like beginning rs.FindFirst has been highlighted in yellow.

    Included is a screenshot of the form
    Attached Thumbnails Attached Thumbnails guide105.bmp  

Posting Permissions

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