Direct jump to a record

  • Thread starter Thread starter Frank Situmorang
  • Start date Start date
F

Frank Situmorang

Hello,

This is my VBA in order to direclty jump to a record of the Decision No.
First I have to inform that I have the Meeting date linked with Minutes of
meeting table. This VBA works but it goes to the set and we have to put the
cursor to meeting no which is in the set of records.

How can we make it goes directly to the decision number, and record selector
shows on the decision number (No_KEP). This is VBA:

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

Set rs = Me.Recordset.Clone
rs.FindFirst "[No_KEP] = '" & Me![Combo20] & "'"
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub

Thanks in advance for any idea

Frank
 
Frank Situmorang said:
Try:

Private Sub Combo20_AfterUpdate()

me.RecordSet.FindFirst FindFirst "[No_KEP] = '" & Me![Combo20] & "'"

End Sub


Note that if NO_KEP is a number field, then you don't need the quotes, then
try:

Private Sub Combo20_AfterUpdate()

me.RecordSet.FindFirst FindFirst "[No_KEP] = " & Me![Combo20]

End Sub
 
Back
Top