A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Ensuring only one commission per product in Access Table



 
 
Thread Tools Display Modes
  #1  
Old January 13th, 2010, 03:06 PM posted to microsoft.public.access.tablesdbdesign
PVANS
external usenet poster
 
Posts: 7
Default Ensuring only one commission per product in Access Table

Good afternoon,

Please can someone help me.

In my Access Database I have a table called tblCommission, with the fields:
Commission_ID;Client_account; Product_code; Commission; Exchange (£ or $)

I need a method to ensure that each client can have a commission set for
every product - but that a client cant have to commission's for one product:

eg: I need a method to prevent this:
Comm_ID Client_account Product_code Commission Exchange
1 000001 Coke 3 $
2 000001 Coke 2 $

Does anyone have any suggestions?

I am quite new to Access and completely stuck with this.

Further infor:

Client_Id is related to my Client_ID in a tblClients
Product_Code is related to my Product_Code in a tblProducts

Really appreciate any help. Thanks in advance

Paul
  #2  
Old January 13th, 2010, 03:49 PM posted to microsoft.public.access.tablesdbdesign
Keith Wilby
external usenet poster
 
Posts: 812
Default Ensuring only one commission per product in Access Table

"PVANS" wrote in message
...
Good afternoon,

Please can someone help me.

In my Access Database I have a table called tblCommission, with the
fields:
Commission_ID;Client_account; Product_code; Commission; Exchange (£ or $)

I need a method to ensure that each client can have a commission set for
every product - but that a client cant have to commission's for one
product:

eg: I need a method to prevent this:
Comm_ID Client_account Product_code Commission Exchange
1 000001 Coke 3
$
2 000001 Coke 2
$

Does anyone have any suggestions?

I am quite new to Access and completely stuck with this.

Further infor:

Client_Id is related to my Client_ID in a tblClients
Product_Code is related to my Product_Code in a tblProducts



Hi Paul.

One way would be to make a composite primary key from the Client_account and
Product_code fields.

Keith.
www.keithwilby.co.uk

  #3  
Old January 13th, 2010, 09:59 PM posted to microsoft.public.access.tablesdbdesign
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default Ensuring only one commission per product in Access Table

It does not need to be the primary key field but just a composite index from
the Client_account and Product_code fields and set to unique.

--
Build a little, test a little.


"Keith Wilby" wrote:

"PVANS" wrote in message
...
Good afternoon,

Please can someone help me.

In my Access Database I have a table called tblCommission, with the
fields:
Commission_ID;Client_account; Product_code; Commission; Exchange (£ or $)

I need a method to ensure that each client can have a commission set for
every product - but that a client cant have to commission's for one
product:

eg: I need a method to prevent this:
Comm_ID Client_account Product_code Commission Exchange
1 000001 Coke 3
$
2 000001 Coke 2
$

Does anyone have any suggestions?

I am quite new to Access and completely stuck with this.

Further infor:

Client_Id is related to my Client_ID in a tblClients
Product_Code is related to my Product_Code in a tblProducts



Hi Paul.

One way would be to make a composite primary key from the Client_account and
Product_code fields.

Keith.
www.keithwilby.co.uk

.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:39 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.