Solved

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

Posted on 2013-05-23
2
719 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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
IIF help, YN field 7 22
What does != "" mean in programming 8 41
SQL Query assistance 16 27
MS Access vba Alter Table Drop Column (3rd column in table) 5 15
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
When table data gets too large to manage or queries take too long to execute the solution is often to buy bigger hardware or assign more CPUs and memory resources to the machine to solve the problem. However, the best, cheapest and most effective so…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

825 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