| Next: Scroller on the sidebar |
| Author |
Message |
pkeegs External

Since: Feb 14, 2006 Posts: 13
|
Posted: Thu Oct 22, 2009 7:04 pm Post subject: Tab control to open when record selected Archived from groups: microsoft>public>access (more info?) |
|
|
I have a client detail form with a tab control with five pages for different
locations. Each page has additional information relating to the clients
location which I currently access by clicking on the control name. I have a
field in the main form for location. Once I set the location is it possible
to automatically open the correct tab on the control so that I can scroll
through the form records and see the additional information without having to
click on the Tab name? |
|
| Back to top |
|
 |
RonaldoOneNil External

Since: Feb 09, 2009 Posts: 4
|
Posted: Fri Oct 23, 2009 1:00 am Post subject: RE: Tab control to open when record selected [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
In the after update event of the Location field set the focust to the tab
name within your tab control and then set focus to the next control on your
main form
Private Sub cmbCustSelect_AfterUpdate()
Me.YourTabName.SetFocus
Me.YourNextMainControl.SetFocus
End Sub
"pkeegs" wrote:
> I have a client detail form with a tab control with five pages for different
> locations. Each page has additional information relating to the clients
> location which I currently access by clicking on the control name. I have a
> field in the main form for location. Once I set the location is it possible
> to automatically open the correct tab on the control so that I can scroll
> through the form records and see the additional information without having to
> click on the Tab name? |
|
| Back to top |
|
 |
Stefan Hoffmann External

Since: Nov 01, 2006 Posts: 39
|
Posted: Fri Oct 23, 2009 4:10 am Post subject: Re: Tab control to open when record selected [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
hi,
pkeegs wrote:
> Once I set the location is it possible
> to automatically open the correct tab on the control so that I can scroll
> through the form records and see the additional information without having to
> click on the Tab name?
Sure. Set the TabControl.Value to the index of your page, e.g. 1 for the
second page.
mfG
--> stefan <-- |
|
| Back to top |
|
 |
Antonio araujo External

Since: Oct 23, 2009 Posts: 1
|
Posted: Fri Oct 23, 2009 11:10 am Post subject: Re: Tab control to open when record selected [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
nao consigo enviar e-mail
"pkeegs" <pkeegs.RemoveThis@discussions.microsoft.com> escreveu na mensagem
news:8E637EB5-147B-4385-945B-20267B112437@microsoft.com...
>I have a client detail form with a tab control with five pages for
>different
> locations. Each page has additional information relating to the clients
> location which I currently access by clicking on the control name. I have
> a
> field in the main form for location. Once I set the location is it
> possible
> to automatically open the correct tab on the control so that I can scroll
> through the form records and see the additional information without having
> to
> click on the Tab name? |
|
| Back to top |
|
 |
pkeegs External

Since: Feb 14, 2006 Posts: 13
|
Posted: Tue Oct 27, 2009 9:30 pm Post subject: RE: Tab control to open when record selected [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
I suspect I have to have a condition in there somewhere. The client details
have a location "Area1", "Area2" etc. What I want to do is when a client in
Area1 is selected, the tab control will open at additional information on
Area1 and likewise when a client in Area2 is selected the tab with additional
information for Area2 will open. The code you have provided works well and I
see how to use it with AfterUpdate and have also used it with OnEntry to
achieve the same effect, but it only opens the one tab. Any solutions?
"RonaldoOneNil" wrote:
> In the after update event of the Location field set the focust to the tab
> name within your tab control and then set focus to the next control on your
> main form
>
> Private Sub cmbCustSelect_AfterUpdate()
> Me.YourTabName.SetFocus
> Me.YourNextMainControl.SetFocus
> End Sub
>
>
> "pkeegs" wrote:
>
> > I have a client detail form with a tab control with five pages for different
> > locations. Each page has additional information relating to the clients
> > location which I currently access by clicking on the control name. I have a
> > field in the main form for location. Once I set the location is it possible
> > to automatically open the correct tab on the control so that I can scroll
> > through the form records and see the additional information without having to
> > click on the Tab name? |
|
| Back to top |
|
 |
|