A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

GoToControl Help



 
 
Thread Tools Display Modes
  #1  
Old March 4th, 2008, 05:04 PM posted to microsoft.public.access.forms
Telobamipada
external usenet poster
 
Posts: 29
Default GoToControl Help

I have a busy form with certain fields which disable based on the response in
others. I would like to have the curser automatically go to a specific field
based on the response provided in another field and I'm not sure how to code
it on the AfterUpdate Event. Say for this purpose I have fields 1 through 50
on my form and Field 1 is a combo box with "Option1, Option2 and Option3". If
option 1 is selected I want the curser to automatically go to field 10. If
option2 is selected I want the curser to automatically go to field 20 and
Option3 to field 30.
Any help is appreciated!! Thanks!
--
If you can read this, thank a Teacher...
If your reading it in English, thank a Veteran!
  #2  
Old March 4th, 2008, 05:12 PM posted to microsoft.public.access.forms
Klatuu
external usenet poster
 
Posts: 7,074
Default GoToControl Help

In the After Update event of the combo:

dim strCtlName As String

Select Case Me.MyCombo
Case "Option1"
strCtlName = "Field10"
Case "Option2"
strCtlName = "Field10"
Case "Option3"
strCtlName = "Field10"
End Select

Me.Controls(strCtlName).SetFocus
--
Dave Hargis, Microsoft Access MVP


"Telobamipada" wrote:

I have a busy form with certain fields which disable based on the response in
others. I would like to have the curser automatically go to a specific field
based on the response provided in another field and I'm not sure how to code
it on the AfterUpdate Event. Say for this purpose I have fields 1 through 50
on my form and Field 1 is a combo box with "Option1, Option2 and Option3". If
option 1 is selected I want the curser to automatically go to field 10. If
option2 is selected I want the curser to automatically go to field 20 and
Option3 to field 30.
Any help is appreciated!! Thanks!
--
If you can read this, thank a Teacher...
If your reading it in English, thank a Veteran!

  #3  
Old March 4th, 2008, 05:59 PM posted to microsoft.public.access.forms
Telobamipada
external usenet poster
 
Posts: 29
Default GoToControl Help

Thank you very much David!!
You are awesome.

--
If you can read this, thank a Teacher...
If your reading it in English, thank a Veteran!


"Klatuu" wrote:

In the After Update event of the combo:

dim strCtlName As String

Select Case Me.MyCombo
Case "Option1"
strCtlName = "Field10"
Case "Option2"
strCtlName = "Field10"
Case "Option3"
strCtlName = "Field10"
End Select

Me.Controls(strCtlName).SetFocus
--
Dave Hargis, Microsoft Access MVP


"Telobamipada" wrote:

I have a busy form with certain fields which disable based on the response in
others. I would like to have the curser automatically go to a specific field
based on the response provided in another field and I'm not sure how to code
it on the AfterUpdate Event. Say for this purpose I have fields 1 through 50
on my form and Field 1 is a combo box with "Option1, Option2 and Option3". If
option 1 is selected I want the curser to automatically go to field 10. If
option2 is selected I want the curser to automatically go to field 20 and
Option3 to field 30.
Any help is appreciated!! Thanks!
--
If you can read this, thank a Teacher...
If your reading it in English, thank a Veteran!

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 06:50 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.