• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 9. Advanced Form Techniques > Synchronizing a Form with Its Underlying ...

Synchronizing a Form with Its Underlying Recordset

We use a form's RecordsetClone property to refer to its underlying recordset. You can manipulate this recordset independently of what's currently being displayed on the form. Here's an example:

Private Sub cboCompany_AfterUpdate()
   'Use the recordset behind the form to locate the client
   ''selected in the combo box
   Me.RecordsetClone.FindFirst "[ClientID] = " & cboCompany.Value

   'If the client is not found, display a message
   'Otherwise, synchronize the form with the underlying recordset
   If Me.RecordsetClone.NoMatch Then
      MsgBox "Client Not Found"
   Else
      Me.Bookmark = Me.RecordsetClone.Bookmark
   End If
End Sub


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint