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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|