Jumping to Record on same form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have two fields on a form:

-ID #
-Related ID #

I would like to create a button next to the Related ID # field that "jumps"
to that specific record. How do I go about doing this? Basically, Access
needs to look at the Related ID # field first (to pull the number), then take
that number and search in the ID#. I'm a newbie...can't ya tell! :)
 
Marianne;

Something like the following (assuming the key is a string; change as
needed) ...

Dim strRecordKey as String
strRecordKey = value-to-jump-to
Me.RecordsetClone.FindFirst "[name-of-key-field] = " & strRecordKey
Me.Bookmark = Me.RecordsetClone.Bookmark

I'm also somewhat a newbie, but I got this elsewhere and it works for me.

Bob (@Martureo.Org)
 
Marianne,

You could put code like this in the Click event of your command button:

Me![­ID #].SetFocus
DoCmd.FindRecord Me![Related ID #]

By the way, as an aside, it is generally regarded as not a good idea to
use a # as part of the name of a field or control.
 
Back
Top