Solved

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

Posted on 2013-05-23
2
729 Views
Last Modified: 2013-05-23
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
Comment
Question by:bill201
2 Comments
 
LVL 12

Accepted Solution

by:
pdebaets earned 500 total points
ID: 39192639
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
 

Author Closing Comment

by:bill201
ID: 39192652
thanks for your fast and excellent solution
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
As technology users and professionals, we’re always learning. Our universal interest in advancing our knowledge of the trade is unmatched by most industries. It’s a curiosity that makes sense, given the climate of change. Within that, there lies a…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

713 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question