473,387 Members | 1,520 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

must be a join or relationship problem?

Ok...I'll first describe briefly what I've done.

Working from a paper form with over 200 fields - broken into 10 areas, I
created a database with 10 tables. I then created a form using those 10
tables, created queries and then reports based on those queries. All works
well until.... you complete a form and DO NOT fill one or more sections (in
other words not filling in an underlying table, then everything falls apart.

Example tables:

Table Name: Names
Primary Key: NameID - autonumber

Table Name: Products
Primary Key: ProductID - autonumber

TableName: Suppliers
Primary Key: SupplierID - autonumber

The relationships are set as being one-to-one and the join type is set to
"1".

So...to be more clear..what is happening...let's say I add a new record,
fill in data for the names section and the products section, BUT NOT the
suppliers section. I look at the tables later and see that there is a new
record (with autonumber) for each the name and the product...but nothing for
the supplier. When I go to query the database I have problems because only
two of the tables are relating (via autonumber). Of course when I add new
records and again leave a section blank..it only compounds the problem.

Let's say after trying a few records I again look at the underlying table.
I see table:Names has 4 records while table: Products has two records and
say TableSuppliers has 3 records. As I said...none of the reports work..and
even when I look at my form..nothing matches up. However, if I go back to
the tables...see that the table with the most records is the products table
with 4 records, I can then go to the other tables and manually add records
until all tables have 4 records. Then the reports and forms work again.

I'm seeing this meaning that this database somehow isn't relating properly
or the join is wrong? I always get confused at this area. Is there a way
to fix this easily? Or...is there a way to force the db to automatically
add a record when a form is open, even if no data is entered?

I appreciate any help you can provide.

Abe


Nov 16 '06 #1
3 1455
Looks to me that you should make at least 1 field in each table
required, that way you can't leave the form without have a new record
in each table.

shawnews wrote:
Ok...I'll first describe briefly what I've done.

Working from a paper form with over 200 fields - broken into 10 areas, I
created a database with 10 tables. I then created a form using those 10
tables, created queries and then reports based on those queries. All works
well until.... you complete a form and DO NOT fill one or more sections (in
other words not filling in an underlying table, then everything falls apart.

Example tables:

Table Name: Names
Primary Key: NameID - autonumber

Table Name: Products
Primary Key: ProductID - autonumber

TableName: Suppliers
Primary Key: SupplierID - autonumber

The relationships are set as being one-to-one and the join type is set to
"1".

So...to be more clear..what is happening...let's say I add a new record,
fill in data for the names section and the products section, BUT NOT the
suppliers section. I look at the tables later and see that there is a new
record (with autonumber) for each the name and the product...but nothing for
the supplier. When I go to query the database I have problems because only
two of the tables are relating (via autonumber). Of course when I add new
records and again leave a section blank..it only compounds the problem.

Let's say after trying a few records I again look at the underlying table.
I see table:Names has 4 records while table: Products has two records and
say TableSuppliers has 3 records. As I said...none of the reports work..and
even when I look at my form..nothing matches up. However, if I go back to
the tables...see that the table with the most records is the products table
with 4 records, I can then go to the other tables and manually add records
until all tables have 4 records. Then the reports and forms work again.

I'm seeing this meaning that this database somehow isn't relating properly
or the join is wrong? I always get confused at this area. Is there a way
to fix this easily? Or...is there a way to force the db to automatically
add a record when a form is open, even if no data is entered?

I appreciate any help you can provide.

Abe
Nov 16 '06 #2
On 16 Nov 2006 13:00:07 -0800, "Cyberwolf" <cy**********@gmail.com>
wrote:

Wouldn't that depend on the Business Rules? Can't make a field
required if it isn't.

-Tom.
>Looks to me that you should make at least 1 field in each table
required, that way you can't leave the form without have a new record
in each table.
<clip>

Nov 16 '06 #3
On Thu, 16 Nov 2006 19:25:04 GMT, "shawnews" <sa***@kalendars.ca>
wrote:

Join problem.
When you have two tables with a relationship between them (let's call
them Parent and Child), and it is allowed for a Parent to have 0 or 1
Child records, then you'll have to use Outer Joins when creating a
query with these two tables. Create the query, right-click on the
relationship line, and choose "Select All from Parent and ..."

-Tom.

>Ok...I'll first describe briefly what I've done.

Working from a paper form with over 200 fields - broken into 10 areas, I
created a database with 10 tables. I then created a form using those 10
tables, created queries and then reports based on those queries. All works
well until.... you complete a form and DO NOT fill one or more sections (in
other words not filling in an underlying table, then everything falls apart.

Example tables:

Table Name: Names
Primary Key: NameID - autonumber

Table Name: Products
Primary Key: ProductID - autonumber

TableName: Suppliers
Primary Key: SupplierID - autonumber

The relationships are set as being one-to-one and the join type is set to
"1".

So...to be more clear..what is happening...let's say I add a new record,
fill in data for the names section and the products section, BUT NOT the
suppliers section. I look at the tables later and see that there is a new
record (with autonumber) for each the name and the product...but nothing for
the supplier. When I go to query the database I have problems because only
two of the tables are relating (via autonumber). Of course when I add new
records and again leave a section blank..it only compounds the problem.

Let's say after trying a few records I again look at the underlying table.
I see table:Names has 4 records while table: Products has two records and
say TableSuppliers has 3 records. As I said...none of the reports work..and
even when I look at my form..nothing matches up. However, if I go back to
the tables...see that the table with the most records is the products table
with 4 records, I can then go to the other tables and manually add records
until all tables have 4 records. Then the reports and forms work again.

I'm seeing this meaning that this database somehow isn't relating properly
or the join is wrong? I always get confused at this area. Is there a way
to fix this easily? Or...is there a way to force the db to automatically
add a record when a form is open, even if no data is entered?

I appreciate any help you can provide.

Abe
Nov 16 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Rowan | last post by:
Hello, I am having a problem with a join. Either I am just not seeing the obvious, it isn't possible, or I need to use a different approach. I have an application with a vsflexgrid that needs...
3
by: Jack Smith | last post by:
Hello, I want to be able to view data from 3 tables using the JOIN statement, but I'm not sure of how to do it. I think i don't know the syntax of the joins.I imagine this is easy for the...
0
by: Arnold | last post by:
Hi there, I have a form to organize bottles in mind, but am unsure if it will work. Here's some background info: Mainform = frmProduct, which contains fields for pricing, status, etc. of...
1
by: Aaron | last post by:
Hello, I hope sombody would be kind enough to help me with this problem I have 3 tables, -Customer Details -Customer Invoices -Invoice Items
1
by: Jim | last post by:
I have a form which is based on a join query. The join relationship is one to many. When a new record is added and the user enters a value for one of the fields in the "many" records, I attempt...
33
by: Steve | last post by:
One of our clients recently upgraded their Office version to 2003. When they tried to run our program (written in Access 2000), they ended up with the wrong data. My coworker and I have tested this...
7
by: Shanimal | last post by:
I would like to know how to join 2 queries so that the results of these 2 queries show up in the same query: SELECT b.bios_serial_number FROM bios b: SELECT s.system_name FROM system s; ...
4
by: polycom | last post by:
Assistance needed to optimize this query SELECT SD.content_id AS Id, SD.title AS Title, CT.name AS Contenttype, PV.content_id AS SponsorId, ...
6
by: BD | last post by:
Hi, all. I need to enforce a one-to-many relationship on 2 tables, with a join table. Say the join table contains account information. It has cust_no and acct_no. Both cust_no and acct_no are...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.