Sub Forms

Al Kramer

New member
Local time
Today, 01:50
Joined
Jan 7, 2025
Messages
5
Hello Acces Brother & Sisters

I'm new to access and have a question about how I should think about creating subforms. I did a few experiments with the subform wizard and was happy with the results except for the fact that the form was difficult to edit after it was created. In my previous life with foxpro it was easy to do a quick & dirty form or prg and clean it up thereafter. Is it very difficult to create a subform without the wizard? Or should I just do my homework & plan properly for creating the form? Any Thoughts or suggestions appreciated.
Thanx
Al
 
I have used Foxpro in the past, in fact still use it to catalogue my CD collection as it is so much faster than Access.
I just link from Access to the Foxpro tables as I have forgotten most of Foxpro now. :(

You can actually just drag an existing form onto another form to create a subform, then set the links correctly.

However you still need to 'do my homework & plan properly for creating the form'
 
except for the fact that the form was difficult to edit after it was created
Do you mean the data within the sub-form was difficult to edit or the sub-form itself. Why do you say it was difficult to edit?
 
A screen shot of the subform would be helpful. Then we may be able to give better examples of how to make things easier for either design or for data entry. Than you can explain which part was difficult to do. For me wrestling with the automatic control layout can be a real pain, and I end up just removing any layout.
 
A screen shot of the subform would be helpful. Then we may be able to give better examples of how to make things easier for either design or for data entry. Than you can explain which part was difficult to do. For me wrestling with the automatic control layout can be a real pain, and I end up just removing any layout.
Me too. And I also delete any Label references on textboxes and comboboxes as well.
 
Do you mean the data within the sub-form was difficult to edit or the sub-form itself. Why do you say it was difficult to edit?
No problem using the form, i had problems trying to edit the form after it was created with the form wizard.
 
A screen shot of the subform would be helpful. Then we may be able to give better examples of how to make things easier for either design or for data entry. Than you can explain which part was difficult to do. For me wrestling with the automatic control layout can be a real pain, and I end up just removing any layout.
MajP, the question was more general. I'm not trying to solve a problem with a particular form. More, should I be using the form wizard or is there a better technique that would still be suitable for a newbie.
 
Editing is what editing is. Depending on where you are in the development process, sometimes a wizard can get you a starter version of a form in place with controls on it and a bound recordsource. Sometimes, though, you have a unique use case that makes it more expeditious to start from scratch.

I would say that if you are using Layout on forms, redesign can be exponentially more difficult. Form Layout doesn't like being altered very much.

1736886342697.png


If your ultimate design is very different from the original wizard-produced version, layout view needs to go away.
 
I be using the form wizard or is there a better technique that would still be suitable for a newbie.
The problem is that some people never learn to build from scratch. So they do not know what to do if the wizard does not give them exactly what they want. I think a lot of seasoned developers use the wizard to start (I do), but only to give me a rough draft. Then I edit from there. You should know how to build a data sheet, single form view, and continuous form view from scratch. Then you will know what to do with the rough draft. That would include building a subform from scratch.
I think as a newbie it is great to start with the wizard, but play around and see what editing you can do.

i had problems trying to edit the form after it was created with the form wizard.
Showing us an example would let us discuss the types of problems in general. I think a few of us are leaning towards you probably were experiencing a "layout" problem. I consider myself a pretty advanced form designer and that kicks my *&! so I just remove them.
 
should I be using the form wizard or is there a better technique that would still be suitable for a newbie.
The best thing that you can do is learn to use any control from the toolbox from scratch. Subform controls will only ask you for these 3 things:
1. Source Object: the form or report to display
2. Link Master Fields: the field(s) in the parent form that exists in the source object of the subform control.
3. Link Child Fields: the field(s) in the source object that exists in the parent form

Master and Child fields are what Access will use to filter your subform, so this can be simplified to just one element: the Source Object. Since the Source Object is a form or report, you can use different form or report techniques to filter the data. This includes avoiding Master/Child links and instead using the Record Source property of the form or report directly.

You can learn a lot by testing different scenarios.
 
I generally start with a query that selects the data in approximately the order I want it to appear on a form. Then I use the wizard to take the saved querydef and build one of the three types of forms using the query as a source rather than the table.

I also find layout view too annoying for words. It is something that people who like web pages like because it produces a big, spacey layout that you cannot change unless you remove the layout.
 
I've a rather old school approach to initial layout design. Paper and pencil. Sketch out what you think you need FIRST. Work through the flow to make sure it will do what you need and be ready to drop it in the bin if it won't. This avoids all investment in a form until you are ready to build it. Then you work out the query that feeds your form, then actually make it.

For many new developers, they let the wizard make the from without thinking through exactly what needs to be on it. They then start changing the record source, move things about, and end up with something that sort of works, but not exactly. This is because they didn't do the hard part up front and identify most (hopefully all) requirements.

From you post about doing a few tries with the wizard, you are describing an incomplete idea of what you need.
 

Users who are viewing this thread

Back
Top Bottom