Hi Mary,
I don't know you would want to do something like the sort but here's an
example:
NOTE: will need to trap for Labels and other controls that do not have a
TabIndex
Function Test()
Dim ctlIndex As Integer, Dim ctlName As String, Dim ctl As Control
ctlName = Screen.PreviousControl.Name
ctlInt = Me(ctlName).TabIndex
For Each ctl In Me.Controls
If ctl.Name = Me.ActiveControl.Name Then
Else
If ctl.TabIndex = ctlInt + 1 Then
ctl.SetFocus
End If
End If
Next ctl
End Function
I hope this helps! If you have additional questions on this topic, please
respond back to this posting.
Regards,
Eric Butts
Microsoft Access Support
(e-mail address removed)
"Microsoft Security Announcement: Have you installed the patch for
Microsoft Security Bulletin MS03-026? If not Microsoft strongly advises
you to review the information at the following link regarding Microsoft
Security Bulletin MS03-026
<
http://www.microsoft.com/security/security_bulletins/ms03-026.asp> and/or
to visit Windows Update at <
http://windowsupdate.microsoft.com/> to install
the patch. Running the SCAN program from the Windows Update site will help
to insure you are current with all security patches, not just MS03-026."
This posting is provided "AS IS" with no warranties, and confers no rights
--------------------
| From: "Mary Fetsch" <
[email protected]>
| Subject: Move To Next Field
| Date: Mon, 26 Jul 2004 15:29:47 -0400
| Lines: 7
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
| Message-ID: <
[email protected]>
| Newsgroups: microsoft.public.access.formscoding
| NNTP-Posting-Host: osgood.bcpfamily.bcp.bz 63.118.153.131
| Path:
cpmsftngxa06.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftngp13
..phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.access.formscoding:240101
| X-Tomcat-NG: microsoft.public.access.formscoding
|
| Is there any "generic" code I can use to move to the next field on a form
| without using the name of the field or control. I basically want to say
| "Move to the next field".
|
| Thanks!
|
|
|