Hi everybody,
I can not add into the "order_detail" subform a product more than once. The
subform just refuses accepting any repeated items. The subform's source is a
"expanded_order_detail" query which is based on "order_detail" table and the
"product" table. The "order_detail" table has two primary keys: "OrderID"
and "ProductID". A typical Northwind type db.
My clients demand that the "order_detail" subform be able to accept repeated
items.
Should I cancel the double primary keys in table "order_detail" in order to
fullfil the demands of my clients?
It drives me nuts....for in the MS Access help it says that table without
primary key can not be used to set up relationship, what should I do?
Thank you very much,
Paul 7 1484
The 2 primary keys combined makes a compound primary key where there can
only be one combination of the two per table. i.e. OrderID = 3 and ProdID =
4 this combination can only happen once with the way you have it set up.
Solution. Remove the 2 primary keys on the OrderID and ProdID and add
another field OrderDetailID (Autonumber) and make this the primary key.
Jeff
"Paul T. Rong" <et***@hotmail.com> wrote in message
news:vM*********************@news.chello.at... Hi everybody,
I can not add into the "order_detail" subform a product more than once.
The subform just refuses accepting any repeated items. The subform's source is
a "expanded_order_detail" query which is based on "order_detail" table and
the "product" table. The "order_detail" table has two primary keys: "OrderID" and "ProductID". A typical Northwind type db.
My clients demand that the "order_detail" subform be able to accept
repeated items.
Should I cancel the double primary keys in table "order_detail" in order
to fullfil the demands of my clients?
It drives me nuts....for in the MS Access help it says that table without primary key can not be used to set up relationship, what should I do?
Thank you very much,
Paul
Jeff,
Thank you very much, your idea is very good. I'll use that. Thanks.
But, strangely, when I removed the primary keys from both "OrderID" and
"ProductID" of the "order_detail" table. The one to many relationship
between "Product"-"order_detail" and between "order"-"order_detail" remains
unchanged. And the "order_detail" subform started to accept repeated
records.
Why? HOw to explain the MS Access help comment on "table without primary key
can not be established relationship"?
Paul
"Jeff Smith" <No***@Not.This.Address> дÈëÏûÏ¢ÐÂÎÅ
:cj**********@lust.ihug.co.nz... The 2 primary keys combined makes a compound primary key where there can only be one combination of the two per table. i.e. OrderID = 3 and ProdID
= 4 this combination can only happen once with the way you have it set up.
Solution. Remove the 2 primary keys on the OrderID and ProdID and add another field OrderDetailID (Autonumber) and make this the primary key.
Jeff
"Paul T. Rong" <et***@hotmail.com> wrote in message news:vM*********************@news.chello.at... Hi everybody,
I can not add into the "order_detail" subform a product more than once. The subform just refuses accepting any repeated items. The subform's source
is a "expanded_order_detail" query which is based on "order_detail" table and the "product" table. The "order_detail" table has two primary keys:
"OrderID" and "ProductID". A typical Northwind type db.
My clients demand that the "order_detail" subform be able to accept repeated items.
Should I cancel the double primary keys in table "order_detail" in order to fullfil the demands of my clients?
It drives me nuts....for in the MS Access help it says that table
without primary key can not be used to set up relationship, what should I do?
Thank you very much,
Paul
The changed order_detail table's structure should be
OrderDetailID (PK) Autonumber
OrderID (FK)
ProductID (FK)
Quantity
Price
Any Other Fields
The relationships should be
tblProducts![ProductID] 1>M tblOrderDetails![ProductID]
tblOrders![OrderID] 1>M tblOrderDetails![OrderID]
Jeff
"Paul T. Rong" <et***@hotmail.com> wrote in message
news:Qv********************@news.chello.at... Jeff,
Thank you very much, your idea is very good. I'll use that. Thanks.
But, strangely, when I removed the primary keys from both "OrderID" and "ProductID" of the "order_detail" table. The one to many relationship between "Product"-"order_detail" and between "order"-"order_detail"
remains unchanged. And the "order_detail" subform started to accept repeated records.
Why? HOw to explain the MS Access help comment on "table without primary
key can not be established relationship"?
Paul
"Jeff Smith" <No***@Not.This.Address> дÈëÏûÏ¢ÐÂÎÅ :cj**********@lust.ihug.co.nz... The 2 primary keys combined makes a compound primary key where there can only be one combination of the two per table. i.e. OrderID = 3 and
ProdID = 4 this combination can only happen once with the way you have it set up.
Solution. Remove the 2 primary keys on the OrderID and ProdID and add another field OrderDetailID (Autonumber) and make this the primary key.
Jeff
"Paul T. Rong" <et***@hotmail.com> wrote in message news:vM*********************@news.chello.at... Hi everybody,
I can not add into the "order_detail" subform a product more than
once. The subform just refuses accepting any repeated items. The subform's
source is a "expanded_order_detail" query which is based on "order_detail" table
and the "product" table. The "order_detail" table has two primary keys: "OrderID" and "ProductID". A typical Northwind type db.
My clients demand that the "order_detail" subform be able to accept repeated items.
Should I cancel the double primary keys in table "order_detail" in
order to fullfil the demands of my clients?
It drives me nuts....for in the MS Access help it says that table without primary key can not be used to set up relationship, what should I do?
Thank you very much,
Paul
Jeff,
It works like charm. Thank you very very much.
But what is FK?
Does it mean the field is required or the Null is allowed?
I am using Access in versions other than English, so I am not very familiar
with the English term?
Paul
"Jeff Smith" <No***@Not.This.Address> дÈëÏûÏ¢ÐÂÎÅ
:cj**********@lust.ihug.co.nz... The changed order_detail table's structure should be OrderDetailID (PK) Autonumber OrderID (FK) ProductID (FK) Quantity Price Any Other Fields
The relationships should be tblProducts![ProductID] 1>M tblOrderDetails![ProductID] tblOrders![OrderID] 1>M tblOrderDetails![OrderID]
Jeff
"Paul T. Rong" <et***@hotmail.com> wrote in message news:Qv********************@news.chello.at... Jeff,
Thank you very much, your idea is very good. I'll use that. Thanks.
But, strangely, when I removed the primary keys from both "OrderID" and "ProductID" of the "order_detail" table. The one to many relationship between "Product"-"order_detail" and between "order"-"order_detail" remains unchanged. And the "order_detail" subform started to accept repeated records.
Why? HOw to explain the MS Access help comment on "table without primary key can not be established relationship"?
Paul
"Jeff Smith" <No***@Not.This.Address> дÈëÏûÏ¢ÐÂÎÅ :cj**********@lust.ihug.co.nz... The 2 primary keys combined makes a compound primary key where there
can only be one combination of the two per table. i.e. OrderID = 3 and ProdID = 4 this combination can only happen once with the way you have it set
up. Solution. Remove the 2 primary keys on the OrderID and ProdID and add another field OrderDetailID (Autonumber) and make this the primary
key. Jeff
"Paul T. Rong" <et***@hotmail.com> wrote in message news:vM*********************@news.chello.at... > Hi everybody, > > I can not add into the "order_detail" subform a product more than once. The > subform just refuses accepting any repeated items. The subform's source is a > "expanded_order_detail" query which is based on "order_detail" table and the > "product" table. The "order_detail" table has two primary keys: "OrderID" > and "ProductID". A typical Northwind type db. > > My clients demand that the "order_detail" subform be able to accept repeated > items. > > Should I cancel the double primary keys in table "order_detail" in order to > fullfil the demands of my clients? > > It drives me nuts....for in the MS Access help it says that table without > primary key can not be used to set up relationship, what should I
do? > > Thank you very much, > > Paul > >
"Paul T. Rong" <et***@hotmail.com> wrote in message news:<Qv********************@news.chello.at>... Jeff,
Thank you very much, your idea is very good. I'll use that. Thanks.
But, strangely, when I removed the primary keys from both "OrderID" and "ProductID" of the "order_detail" table. The one to many relationship between "Product"-"order_detail" and between "order"-"order_detail" remains unchanged. And the "order_detail" subform started to accept repeated records.
Why? HOw to explain the MS Access help comment on "table without primary key can not be established relationship"?
Paul
Okay, in simple terms and paraphrasing,
Relationships go "from" a table, "to" another table. The column(s)
that you are going from, in the "from" table does not have to be a
Primary Key (or one part of a primary key), but the column(s) that you
are going to, in the "to" table MUST be the primary key.
In your example, the order_detail table is your "from" table, and the
product table is your "to" table.
Damien,
So it means in this case the "product" table which is the "one" side is a
"to" table, and the "order_detail" table which is the "many" side is a
"from" table?
Then the relationship direction is from a "many" side table to a "one" side
table?
Thanks, but I am totally confused.
Paul
"Damien" <Da*******************@hotmail.com>
??????:ac**************************@posting.google .com... "Paul T. Rong" <et***@hotmail.com> wrote in message
news:<Qv********************@news.chello.at>... Jeff,
Thank you very much, your idea is very good. I'll use that. Thanks.
But, strangely, when I removed the primary keys from both "OrderID" and "ProductID" of the "order_detail" table. The one to many relationship between "Product"-"order_detail" and between "order"-"order_detail"
remains unchanged. And the "order_detail" subform started to accept repeated records.
Why? HOw to explain the MS Access help comment on "table without primary
key can not be established relationship"?
Paul
Okay, in simple terms and paraphrasing,
Relationships go "from" a table, "to" another table. The column(s) that you are going from, in the "from" table does not have to be a Primary Key (or one part of a primary key), but the column(s) that you are going to, in the "to" table MUST be the primary key.
In your example, the order_detail table is your "from" table, and the product table is your "to" table.
FK = Foreign Key. It's the field which stores the linking value in the child
table from the parent table.
"Paul T. Rong" <et***@hotmail.com> wrote in message
news:T%*********************@news.chello.at... Jeff,
It works like charm. Thank you very very much.
But what is FK? Does it mean the field is required or the Null is allowed? I am using Access in versions other than English, so I am not very
familiar with the English term?
Paul This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Tom |
last post by:
A question for gui application programmers. . .
I 've got some GUI programs, written in Python/wxPython, and I've got
a help button and a help menu item. Also, I've got a compiled file
made with...
|
by: Sarir Khamsi |
last post by:
Is there a way to get help the way you get it from the Python
interpreter (eg, 'help(dir)' gives help on the 'dir' command) in the
module cmd.Cmd? I know how to add commands and help text to...
|
by: Sudheer Kareem |
last post by:
Dear All
Please tell me how to assosiate help files with my Vb.net
Project.
Regards
Sudheer
|
by: wukexin |
last post by:
Help me, good men. I find mang books that introduce bit "mang header
files",they talk too bit,in fact it is my too fool, I don't learn it, I have
do a test program, but I have no correct doing...
|
by: d.warnermurray |
last post by:
I am doing a project for school that involves creating help files for a html
authoring tool.
If you could help me with answers to some questions it would really help.
1. What tasks do you expect...
|
by: Colin J. Williams |
last post by:
Python advertises some basic service:
C:\Python24>python
Python 2.4.1 (#65, Mar 30 2005, 09:13:57) on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
With...
|
by: Steve |
last post by:
I have written a help file (chm) for a DLL and referenced it using Help.ShowHelp
My expectation is that a developer using my DLL would be able to access this help file during his development time...
|
by: JonathanOrlev |
last post by:
Hello everybody,
I wrote this comment in another message of mine, but decided to post it
again as a standalone message.
I think that Microsoft's Office 2003 help system is horrible, probably...
|
by: trunxnirvana007 |
last post by:
'UPGRADE_WARNING: Array has a new behavior. Click for more: 'ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?keyword="9B7D5ADD-D8FE-4819-A36C-6DEDAF088CC7"'
'UPGRADE_WARNING: Couldn't resolve...
|
by: hitencontractor |
last post by:
I am working on .NET Version 2003 making an SDI application that calls MS Excel 2003.
I added a menu item called "MyApp Help" in the end of the menu bar to show Help-> About.
The application...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
|
by: ryjfgjl |
last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
|
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...
|
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...
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
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...
| |