Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / May 2007

Tip: Looking for answers? Try searching our database.

establishing sub forms existing forms

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Danny - 09 May 2007 01:33 GMT
I was curious if this is possible.  I have approx 4 or 5 forms that
update different tables in the database.  Is it possible to establish
a sub form on these 4 or 5 forms, without having to rebuild from
scratch?   The intent would be so users can enter information into
each form without having to open each form.
John W. Vinson - 09 May 2007 06:15 GMT
>I was curious if this is possible.  I have approx 4 or 5 forms that
>update different tables in the database.  Is it possible to establish
>a sub form on these 4 or 5 forms, without having to rebuild from
>scratch?   The intent would be so users can enter information into
>each form without having to open each form.

Sure. Open the Form in design view; use the Subform tool on the toolbox to add
a subform. If you have the toolbox "magic wand" icon selected, a wizard will
walk you through; you can add an existing form, or create a new subform.

It is important that the *tables* upon which the forms are based be
appropriatelyh related. YOu can't just throw a bunch of unrealated forms
together and expect to get good results...

            John W. Vinson [MVP]
Pixie78 - 09 May 2007 14:44 GMT
I'm still pretty new with all this but I would say yes.  I had my forms set
up that way but then I changed my subforms to read only.  But in the
beginning I did enter in my info on the subforms and it updated my tables as
it should.  As long as your forms are drawn from your tables and your tables
are related correctly you should have no problems.

> I was curious if this is possible.  I have approx 4 or 5 forms that
> update different tables in the database.  Is it possible to establish
> a sub form on these 4 or 5 forms, without having to rebuild from
> scratch?   The intent would be so users can enter information into
> each form without having to open each form.
Danny - 09 May 2007 15:33 GMT
> I'm still pretty new with all this but I would say yes.  I had my forms set
> up that way but then I changed my subforms to read only.  But in the
[quoted text clipped - 9 lines]
>
> - Show quoted text -
Thanks for your responses. A couple of things I was wondering.

The tables are table 1 has a one to many relationship with table 2 and
3.  Table 2 has a 1 to many relationship to table 4 and 5.

Would a sub form work in this fashion or would something else be
needed to make this work?

When looking at the sub form using the wizard it shows all data fields
basically on one form in form view.  Is there away to set up a sub
form that looks like a single form type in form view and to tab to the
other forms?
John W. Vinson - 09 May 2007 18:34 GMT
>The tables are table 1 has a one to many relationship with table 2 and
>3.  Table 2 has a 1 to many relationship to table 4 and 5.
>
>Would a sub form work in this fashion or would something else be
>needed to make this work?

Subforms can be nested (an absurd seven layers deep, if you want to be that
cruel to your users). Two layers is easy... see below.

>When looking at the sub form using the wizard it shows all data fields
>basically on one form in form view.  Is there away to set up a sub
>form that looks like a single form type in form view and to tab to the
>other forms?

The Wizard isn't very clever, frankly. You can start with the wizard's form
and then customize it.

I'd use:

- a main form (frmMain let's call it)  based on Table1, or a query sorting the
data in Table1
- Two subforms on frmMain, based on Table2 (sub2) and Table3 (sub3)
respectively
- You can open the form used in sub2 and view its Properties. Change the
Default View from Datasheet to Single (and you may want to disallow Datasheet,
Pivot Table, and the other irrelevant views).
- Put two subforms on sub2 based on Tables 4 and 5.

If you need more screen real estate, you can put a Tab Control on frmMain; put
sub2 and its subforms on one page, sub3 on another.

Normally a subform is used for the "many" side of a relationship; when you
finish a record on the subform, it will by default go to a new record on that
subform so you can keep adding records. Typing Ctrl-Tab will tab out of the
subform to the next control in the main form's tab order (which may well be
another subform). There's tricks to make it tab automatically to the next
subform as soon as you finish a record - but that should only be done if you
very rarely have two or more child records.

            John W. Vinson [MVP]
Danny - 10 May 2007 23:53 GMT
On May 9, 10:34 am, John W. Vinson
<jvinson@STOP_SPAM.WysardOfInfo.com> wrote:

> >The tables are table 1 has a one to many relationship with table 2 and
> >3.  Table 2 has a 1 to many relationship to table 4 and 5.
[quoted text clipped - 36 lines]
>
>              John W. Vinson [MVP]

Sorry so late on the post.  Thanks for the input and information, I
really appreciate it you helped a lot.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.