• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 775
  • Last Modified:

how to move the cursor with vba on a fom in access 2013 to a specific record

hi

how can i with vba to move the cursor in a form to a record that the "id" field equel 1  and put the cursor on this record (that the id=1) but  on a different filed that called for example CustomerID

something like this

docmd.GoToRecord id=1
customerid.SetFocus
0
bill201
Asked:
bill201
1 Solution
 
pdebaetsCommented:
me.recordsetclone.findfirst "ID = 1"
if me.recordsetclone.nomatch then
    msgbox "Record not found."
else
    me.bookmark = me.recordsetclone.bookmark
    customerid.setfocus
endif

Open in new window

0
 
bill201Author Commented:
thanks for your fast and excellent solution
0

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now