473,467 Members | 1,488 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

composite key in access

1 New Member
Hi guys
I wanna create composite key in access but the thing is that I want the tuple to be unique not each one of keys
for example one person can not have the same account number at the same time but can have another account number.
can you help me with this please?
Apr 6 '08 #1
2 3108
FishVal
2,653 Recognized Expert Specialist
Hi, yasmin.

If I've understood your correctly, then you want to have composite key with one of the fields be unique. Did you try the obvious things like:
  • Set composite primary key
  • Set "Indexed" property of the field expected to be unique to "Yes(No duplicates)"

Kind regards,
Fish
Apr 6 '08 #2
ADezii
8,834 Recognized Expert Expert
Hi guys
I wanna create composite key in access but the thing is that I want the tuple to be unique not each one of keys
for example one person can not have the same account number at the same time but can have another account number.
can you help me with this please?
I'm a little confused on your request also, but to create a Composite, Primary Key where the combination of 2 Fields is Unique, but there can be multiple entries in the individual Fields:
  1. In Table Design View.
  2. Select the 1st Field of the Composite Key
  3. Hold down the Control Key (CTRL) while selecting the 2nd Field of the Composite, Primary Key
  4. Right Click the selection
  5. Click Primary Key (1st option in the shortcut menu)


'Records 1 through 4 will be accepted, Record 5 will not!
Expand|Select|Wrap|Line Numbers
  1. ..............Field 1                  Field 2
  2. Record 1      Dog                      Male
  3. Record 2      Dog                      Female
  4. Record 3      Cat                      Female
  5. Record 4      Mouse                    Female
  6. Record 5      Dog                      Male        'that's a NO NO!
Apr 6 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Matan Nassau | last post by:
Hello. i have a composite which i want to delete. this is a composite which represents a boolean expression (see a previous post of mine with more details at...
2
by: bq | last post by:
Hello, This post is really two questions. Question 1: What is the current status on a revision of ISO C++, specifically regarding plans for overloading composite operators? Some people in this...
0
by: AshifToday | last post by:
this was my and my frineds little project in earlier classes, the program seperates the composite and prime numbers in two sections of the screen ===================== /* This program has...
18
by: Thomas A. Anderson | last post by:
I am a bit confused in creating a composite primary key. I have three table with two of the tables containing primary keys. I have two of the tables (each with a primary key) having one to many...
4
by: Ismail Rajput | last post by:
Is there any option we can use Composite DataKeyField in the DataList and DataGrid?
2
by: bobby_b_ | last post by:
I have a table where fields 1 and 2 make up the primary key. Because of this, I have a unique composite index on fields 1 and 2 (as required by DB2). Now my question is: Fields 1 and 2 are also...
2
by: pkpatil | last post by:
Hi, Can a private composite object in a class access private or protected members of base class? For e.g. class composite { void memberFunction(); };
14
by: dave.dolan | last post by:
Basically I'd like to implement the composite design pattern with leaves that are either of reference or value types, but even using generics I can't seem to avoid boxing (using ArrayList or...
6
by: mac | last post by:
Summary: 1. I want to define a column in anMS Access table to be lookups on other tables. 2. The table that is the data source (e.g the "parent" table) has a composite primary key. 3. When...
54
by: csolomon | last post by:
Hello: I was wondering if I could get some input on how to address a design issue, involving my composite table. I have one portion of my project complete. The following forms and reports I...
1
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...
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,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

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.