View Full Version : 3 Tables - 1 Form


ssaucedo
01-28-2009, 12:23 PM
I tried to use the form wizard to create a form based on 3 tables. But when the wizard was finished all that displayed was a blank form with a title.

Need some help.

MSAccessRookie
01-28-2009, 12:30 PM
I tried to use the form wizard to create a form based on 3 tables. But when the wizard was finished all that displayed was a blank form with a title.

Need some help.

In order to help, we need more information.

How are the tables related to each other
What Column(s) were you expecting
I created a test database and it allowed me to do what you cannot do.

ssaucedo
01-28-2009, 12:50 PM
I have 3 tables and am using Access 2007 on a PC:

Contract
Invoice
Address

The contract # is the primary key in the contract table and the relationship is one to many.

ONE MANY
Contract - Address
Contract - Invoice

I used the wizard to create the form and basically cannot see the fields in form view only of the title of the form. I was trying to put almost all the fields from each table in the one form.

MSAccessRookie
01-28-2009, 12:55 PM
I have 3 tables and am using Access 2007 on a PC:

Contract
Invoice
Address

The contract # is the primary key in the contract table and the relationship is one to many.

ONE MANY
Contract - Address
Contract - Invoice

I used the wizard to create the form and basically cannot see the fields in form view only of the title of the form. I was trying to put almost all the fields from each table in the one form.

My sample tables were similar to yours, (one table that was 1-->M to two others). I use Access 2003.

I asked to display all data from each table, what were you looking for?

ssaucedo
01-28-2009, 12:59 PM
just a form or form with 2 subforms but the form displays in form view and all i can see is the title, no fields

The_Doc_Man
01-29-2009, 09:13 AM
Sub-forms change things considerably. Do they exist already?

Normally, when you use a wizard to create a multi-table form, it will try to ask you what it thinks it needs to know. If you were building something that involves some bizarre grouping, it would dynamically build a JOIN query. You can help by assuring that a formal relationship exists between the participating tables because that will provide critical data to the wizard about what it can and cannot expect.

When you make it a parent/child situation, that pre-defined relationship becomes even more important because that is something that Access will use to build the form with the right data linkage form-to-form. But to make it work in the parent/child forms case, the child form has to exist already and has to include the linking field in its underlying query, whether or not that link is visible on the child form. (It can exist on the form and be invisible, for example...)

When you see the form but cannot populate it, that is a sure sign that at least one of the linkages is so hosed up that Access cannot identify the record - or that it is so restrictive a relationship that no combination of records exists to match the selection criteria. (I suspect the latter if you didn't have relationships already built.)

ssaucedo
01-29-2009, 09:17 AM
I have one table "Contracts" that has a one-many relationship with a table, "Address" and it also has a one-many relationship with another table, "Invoice".

Since my post, I built a form from scratch. Started with a form based on the table "Contracts" and inserted two subforms, based on the tables "Address" and "Invoice", however when I actually try to enter data, the cursor will not tab to the second subform and goes to the next record in the first subform.

Looking for a better solution or how to address the tabbing issue.

Ultimately, after completing the fields in the first subform, I would like the cursor to go to the first field in the second subform and then after completing the final field in the second subform, I would like the cursor to then go back to the first field in the main form to create a new record.