Results 1 to 1 of 1
  1. #1
    Join Date
    Jun 2008

    Unanswered: how to code: on update - search record

    I have a form with subforms that I want to create a combo box for that users can use to browse records.

    What's the proper way to use DoCmd.GoToRecord?

    I found a small solution that works, my only problem is that if I use my other navigation buttons (next, previous, etc), the combo box does not change to reflect the current selected record.

    here is the after update:

    Private Sub Combobox_AfterUpdate()

    Dim rs As DAO.Recordset

    If Not IsNull(Me.Combobox) Then
    Set rs = Me.RecordsetClone
    rs.FindFirst "[recordfield] = """ & Me.Combobox & """"
    If rs.NoMatch Then
    MsgBox "No matching record"
    Me.Bookmark = rs.Bookmark
    End If
    Set rs = Nothing
    End If

    End Sub
    Also, is there a way to create a button or bar that you can click and drag to move the form? (in lieu of the bar on top of the form)
    Last edited by coffeecat; 07-21-08 at 22:26.

Posting Permissions

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