Solved

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

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
Shadow IT is coming out of the shadows as more businesses are choosing cloud-based applications. It is now a multi-cloud world for most organizations. Simultaneously, most businesses have yet to consolidate with one cloud provider or define an offic…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

758 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now