Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Keeping a for on top ??

Status
Not open for further replies.

ramrags

IS-IT--Management
Aug 17, 2001
62
US
I have a small doctor’s office database, and on it I have a form called frmCHART that opens with the patient name and info, in the detail of that form I have a tab control with 4 tabs with other forms on them. I would like to change it a little and get rid of the tabs for command buttons that would open the other forms. I would like to open the new forms on the frmCHART or keep the form on top so you can see the patient info up so it can be seen or switch forms. The problem I’m having is that when the chart form opens I set focus to the sub form and loose the tab control where you have to scroll to get the tab and the form does not look correct. Thank you for any help you can give.
 
It's hard to picture exactly what you have or what you're after, but it sounds like subforms could work for you.

However, if the form is working, consider setting the properties of the tab control so it has no tabs (Style = None) and using command buttons to set the focus to the aprropriate page
Code:
TabCtl9.Pages("myPageName").SetFocus
 
How are ya ramrags . . .

The technique that follows involves removing the Tab Control, reinstantiating the subforms and using the subforms [blue]Visible property[/blue] to show the desired subform.

In the form window of the DB:
[ol][li][blue]Right-Click[/blue] frmCHART & [blue]copy[/blue].[/li]
[li][blue]Right-Click a blank area[/blue] in the form window & [blue]paste[/blue].
Give the form [blue]another name[/blue].[/li]
[li]Open frmCHART is [blue]design view[/blue].[/li]
[li][blue]Select & delete[/blue] the tab control.
Note: [purple]the subforms will be deleted with it[/purple].[/li]
[li]Using the [blue]subform wizard button[/blue]
subFrmRpt.BMP
one by one [blue]put the subforms back on frmCHART[/blue] and perform the following:
[ol a][li][blue]Position & Size[/blue] the subform.[/li]
[li]Set the [blue]Visible property[/blue] to [purple]No[/purple] (you can leave the [blue]most used subform[/blue] set to yes so it opens visible while the others are hidden.[/li][/ol][/li]
[li]In the [blue]Click event[/blue] your buttons just show the subform you want and hide the others:
Code:
[blue]   [subFormName1].visible = False
   [subFormName2].visible = True
   [subFormName3].visible = False[/blue]
[/li][/ol]
[blue]Your Thoughts? . . .[/blue]

Calvin.gif
See Ya! . . . . . .
 
I think i'm going to try that thanks alot.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top