Direct jump to a record

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
 
A

Albert D. Kallal

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top