Move cursor to a specified field

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

Guest

Does anyone have any sample code on how I can move the cursor to a specified
field on an Access form when a certain criteria is met on a subform?

Thanks in advance.
 
Hi, Marv.

To move the location of the cursor from a subform to another form that is
currently open (even if it's not the form that contains the subform in
question), try:

If (certain_criteria) Then
Forms("frmMain").txtMyField.SetFocus
End If

.... where "frmMain" is the form that has "txtMyField," the specific text box
where you want the user to type the next entry.

HTH.

Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.

(Please remove ZERO_SPAM from my reply E-mail address, so that a message
will be forwarded to me.)

- - -
When you see correct answers to your question, please sign in to Microsoft's
Online Community and mark these posts, so that all may benefit by filtering
 
Back
Top