Forms not Displaying Once adding large RowSource Query

DreamAwake

Registered User.
Local time
Today, 01:00
Joined
Dec 13, 2007
Messages
23
I've got about 5 or so tables in my Back End. Now when I pull this query on the forms OnLoad event so I can save the data no forms are displaying. But if only display 1 table in the query they do show.

Is there a limit I can only seem to have only 2 tables referenced at once.

Thanks
 
No, what is happening is that you probably have records in one or two tables but not all. If you want to display all of them regardless of whether there are records in the other tables, you need to use an outer join.
 
Yeh thats what I thought at first too. I know a little bit about INNER & OUTER joins but tinkered a while but coulnd't get it working.

Just to note there is a main table called PROJECTS which is referencing all other tables via PROJECTS PMK.

When I am opening this table PROJECTS gets an AutoNumber so really all tables should have no value at all until I enter the value.

Regards;
 
Are these one-to-one relationships or one-to-many?

If one-to-one, you may be better off having everything in one table as it all depends on the data being stored.

If one-to-many then you don't want the other tables in the same query for the form. You would need to use the one table for the main form and then subforms for each of the other tables.
 
Yes its all 1-1

I just don't seem why its a problem query all tables as I do need to save data to them all from the 1 page.
 
I tried subforms but it just didn't seem to work. like I need it to reference the PROJECTS PMK but now its not going to know what it is because the tables are not referenced.
 
You would link the master / child links to the primary key of the main table (which should be the foreign key in the child tables). I still wonder if you have it set up correctly because with that many tables and it being all one-to-one relationships, it doesn't necessarily make sense to have more than one table (it might, depending on the data being stored, but it really might not be necessary).

Can you share your table structure? Or post the db?
 
Thanks, I have never used subforms before so was unaware of that property. It now links the PMK. Its not 100% important but when you type a value in a text box linked tot he Project table it creates a PMK value from AutoNumber.

But when I type data in the subform it does not.

Regards,
 
The master / child links of the subform container control on the main form that houses the subform should have the the PMK as the Master and the same field from the Child table in the Child link.

Now, the child tables should have PMK in them but as Long Integer and not autonumber because they are needed to store the primary key from the main table and if you have set it as autonumber it can't store it.

Each table should have a primary key (autonumber is good) but it also has the foreign key - something like this:

MainTable

PMK - Autonumber (PK)
Field1
Field2
Field3

OtherTables
OtherID - Autonumber(PK)
PMK - Long Integer (FK)
MyField
MyOtherField

etc.
 
Thank you i'm quite sure i've got it all sorted.

Your assistance was appreciated.

Green Points to you..
 

Users who are viewing this thread

Back
Top Bottom