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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Open form in relation to other form on screen

Status
Not open for further replies.

btrini10

IS-IT--Management
Dec 5, 2006
73
US
Hello all, I have a main form with buttons that when clicked open various subforms in datasheet view. I would like my subforms to open right below my main form and at the same size. The problem I am having is that I have a multi-user database and users have varying screen resolutions. Therefore, the subforms open fine on my screen but open all over other users' screens. Is there a way for me to open the subforms based on where the main form appears on each different user's screen no matter their screen resolution? I am using MS Access 2000. I thought of getting the location of the main form and using that to open and size the subform but the Me.top and Me.left properties do not seem to work.
Thanks in advacne for any help.
 
Hey Duane, thanks for your reply. I have a back end database that sits on our server farm and each user has the front end on his/her desktop. I originally had the subforms in tabs on the main form but the main form was taking forever to load on the users' desktops. I removed the tabs and the subforms and the form appears to load a lot quicker. I am certainly open to suggestions other than opening the subforms with a button.
 
You could try set the subforms to invisible until needed or maybe use code to set the Source Object of a subform control. I believe either of these will load only the visible, bound subforms.

Duane
Hook'D on Access
MS Access MVP
 
How are ya btrini10 . . .

In parallel with [blue]dhookom[/blue] I've gotton around this by loading the [blue]Recordsource[/blue] of the subforms thru the [blue]On Load[/blue] event of the mainform. The recordsources are initially empty and saved so in design view.

[blue]Your Thoughts? . . .[/blue]

See Ya! . . . . . .

Be sure to see thread181-473997 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
Hey Aceman, just to be sure I get this. The subform is only loaded when the tab is selected and you are suggesting to load the Recordsource for the specific form only when the tab is selected. Do I unload the recordsource once another tab is selected, or how would that work?
 
btrini10 . . .

My post to refer to is in relation to your having the subforms on a tab control on the mainform.
btrini10 said:
[blue]The subform is only loaded when the tab is selected and you are suggesting to load the Recordsource for the specific form only when the tab is selected.[/blue]
No.
TheAceMan1 said:
[blue] ... loading the Recordsource of the subforms thru the On Load event of the mainform.[/blue]
As an example I have a main form with two subforms. In design view the recordsources are set to nothing and the form is saved. In the [blue]OnLoad[/blue] event of the mainform I have:
Code:
[blue]   [sfrmClients].form.RecordSource = "qryClients"
   [sfrmDetails].form.RecordSource = "qryClientDetails"[/blue]

[blue]Your Thoughts? . . .[/blue]

See Ya! . . . . . .

Be sure to see thread181-473997 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top