Form on form (1 Viewer)

Bobp3114

Member
Local time
Tomorrow, 00:06
Joined
Nov 11, 2020
Messages
75
I have been asked to change present forms so that there is a"Background" form with no connection to any table and that only contains a few Command buttons. Then showing always, three smaller forms, each derived from it's own query and always placed on the background form in the same position. Each of these three forms to act independently of each other.
I can open each in sequence and make the three popup but this seems sloppy
Any ideas appreciated
Bob
 
have a look at Daniel Pinault's excellent paper on Subclassing Forms (w_w_w.devhut.net/microsoft-access-form-subclassing-101/) as an idea. He also provided a youtube video on that topic

Greetings
Bernd
 
Seems sloppy how? Like, since we can't see--and you haven't described--the specific sloppiness in question, how do we suggest useful de-slopification ideas?
Describe what "sloppy" means to you in greater detail.
 
and always placed on the background form in the same position
Does that mean overlap? or maybe one next to the other?

What is sloppy? the popup version? the side by side version? the overlapping version?

What is it supposed to solve?

Why 3 forms? Why exactly 3 and not more?
 
This sounds like a classic case of needing a clean, modular UI in Access that mimics a dashboard-style layout. The goal is to have a persistent "Background" form acting as a container, with three independent subforms that behave like widgets, each driven by its own query which is what you are doing... Nothing sloppy about that!

If you're targeting different screen resolutions or Access window sizes, consider using Anchoring in the subform controls to keep them in place relative to the background form edges.
 
I have been asked to change present forms so that there is a"Background" form with no connection to any table and that only contains a few Command buttons. Then showing always, three smaller forms, each derived from it's own query and always placed on the background form in the same position. Each of these three forms to act independently of each other.

As others have said, doesn’t this simply require an unbound parent form in which are placed three bound subforms? The image below is of a simple example from one of my online demo files. In this case the parent from is bound, and the subforms' RecordSource properties are three different queries on the same table, but those factors are by the bye. The parent form could equally well be unbound and the subform's based on different tables.

CompaniesForm.gif
 
I have been asked to change present forms so that there is a"Background" form with no connection to any table and that only contains a few Command buttons. Then showing always, three smaller forms, each derived from it's own query and always placed on the background form in the same position. Each of these three forms to act independently of each other.
I can open each in sequence and make the three popup but this seems sloppy
Any ideas appreciated
Bob
Upload the database so we can see what you mean.
 
then showing always, three smaller forms, each derived from it's own query and always placed on the background form in the same position.
By in the same position does that mean all three forms appear on the main form in their own position or you display one of the three forms in the same (one position).
If it is the former do as in post #7. If the Latter it is a matter of making on single subform control and then the buttons change the Source Object of the subform control. So each button makes a different subform appear. However it may be simpler than that. You just change the rowsource of the subform.
 
Just create an unbound MainForm and add each of the other forms as subforms. You can auto-center it and use that form to auto-open when the project is opened. I use this technique especially when there are a lot of continuous forms used in the project that don't allow subforms to be used. You still have access to the forms when the project opens without having to always click a button. You can position and size the subforms as you wish and they always stay in the same place on your screen. You can also make forms visible and not visible as needed. I do use command buttons for that placed on the MainForm anywhere I wish.
 
I think I counted 4 or 5 people telling you to add the three "popup" forms as subforms on the unbound form. They will stay where you positioned them and not move around. Popups are the wrong solution, in case that wasn't clear.
 
As others have said, doesn’t this simply require an unbound parent form in which are placed three bound subforms? The image below is of a simple example from one of my online demo files. In this case the parent from is bound, and the subforms' RecordSource properties are three different queries on the same table, but those factors are by the bye. The parent form could equally well be unbound and the subform's based on different tables.

View attachment 121177
 
WOW! At a loss as to how to answer everybody but here goes. Ken, Pat helpful as usual.
bbfromgb thanks, I have visited that article and will study it. Appears that my statement was not sufficient for some,
so I am attaching an image.
I am at a loss as to how I have subforms on a form that is not linked to a table? What is the relationship that binds them?
My "sloppy" attempt used the following after building the forms: i used pop up to place three forms above the one.
DoCmd.OpenForm "Form2"
DoCmd.OpenForm "Form3"
DoCmd.OpenForm "Form4"
DoCmd.OpenForm "Form5"

Just a note: I am self taught with the help of this forum. Not all persons asking for help are experts. To be able to admit your shortcomings is admirable. The good point here is that for the first time I have a detailed statement from the company, of what is needed to be produced rather that a vague "can you do this?
My thanks for the helpful replies

 

Attachments

I am at a loss as to how I have subforms on a form that is not linked to a table?
they don't need to be linked to a table, there is noting to bind them - just leave the subform control linkchild/master properties blank

easy to do, in design view of your main form, just drag the forms you want from the navigation window and size to suit. You may want to delete the associated labels and rename the subform controls, but that is all you would need to do. Take less than a minute
 
Assuming you have Activities, Opportunities and Rep Reports as tables or queries,

1. Create a continuous form for each of them, if you don't have them yet. Each form will have its own independent query.

2. Create a blank form

3. Add subforms to the blank form.
a) You could drag the 3 mentioned forms to this blank form to create the subform controls, or
b) Create 3 subform controls in the blank form first, and then assign a form to each control by using their source object property.

4. Add the 5 buttons to the blank form.

5. Add the search textbox to the blank form

6. Add the orange header to each form:
a) You could add it above the subform control itself, or
b) You could add it inside the form, above the column headers.

7. Resize the subform controls and their contents to look as closely as possible to the desired layout.
 
My "sloppy" attempt used the following after building the forms: i used pop up to place three forms above the one.
you are right about sloppy.
just add those form's as Sub-form of your Main form.
 
Assuming you have Activities, Opportunities and Rep Reports as tables or queries,

1. Create a continuous form for each of them, if you don't have them yet. Each form will have its own independent query.

2. Create a blank form

3. Add subforms to the blank form.
a) You could drag the 3 mentioned forms to this blank form to create the subform controls, or
b) Create 3 subform controls in the blank form first, and then assign a form to each control by using their source object property.

4. Add the 5 buttons to the blank form.

5. Add the search textbox to the blank form

6. Add the orange header to each form:
a) You could add it above the subform control itself, or
b) You could add it inside the form, above the column headers.

7. Resize the subform controls and their contents to look as closely as possible to the desired layout.
 
I am at a loss as to how I have subforms on a form that is not linked to a table? What is the relationship that binds them?
There is none. They are independent. But the subforms are NOT popups. The subform control is a control. It doesn't move around unless you write code to move it
 

Users who are viewing this thread

Back
Top Bottom