How to make the data not duplicate within that particular primary key within
the same table?
For example, a table has the job number as the primary key and the item
number as the normal data (not primary key). This means a job can have
various item and not duplicate item but the item will be duplicate within
each different new job? How?
--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/200704/1
|
|
0
|
|
|
|
Reply
|
EMILYTAN
|
4/13/2007 7:17:23 AM |
|
Add an index built on TWO columns, and mark that index as being unique.
To build an index on TWO columns, in the table design, have the Index sheet
(form) visible, give a name to your new index (first column), give one of
the field in the second column, change row, DON'T TYPE a name in the first
column, and, in the second column, add the second field.
Click on the first row (defining the index) and have the Unique option set
to yes (it is a line near the bottom of the Indexes sheet).
In your case, that index is likely to have project and item, for its two
fields. You will be able to have two items =1, but NOT in the same project.
Hoping it may help,
Vanderghast, Access MVP
"EMILYTAN via AccessMonster.com" <u33296@uwe> wrote in message
news:70a15fbed0e64@uwe...
> How to make the data not duplicate within that particular primary key
> within
> the same table?
> For example, a table has the job number as the primary key and the item
> number as the normal data (not primary key). This means a job can have
> various item and not duplicate item but the item will be duplicate within
> each different new job? How?
>
> --
> Message posted via AccessMonster.com
> http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/200704/1
>
|
|
0
|
|
|
|
Reply
|
Michel
|
4/13/2007 2:01:39 PM
|
|
wow great!
but can you explain with me step by step from scratch if you dont mind...
It is ok if you can't...
Thanks for helping...
Michel Walsh wrote:
>Add an index built on TWO columns, and mark that index as being unique.
>
>To build an index on TWO columns, in the table design, have the Index sheet
>(form) visible, give a name to your new index (first column), give one of
>the field in the second column, change row, DON'T TYPE a name in the first
>column, and, in the second column, add the second field.
>
>Click on the first row (defining the index) and have the Unique option set
>to yes (it is a line near the bottom of the Indexes sheet).
>
>In your case, that index is likely to have project and item, for its two
>fields. You will be able to have two items =1, but NOT in the same project.
>
>Hoping it may help,
>Vanderghast, Access MVP
>
>> How to make the data not duplicate within that particular primary key
>> within
>[quoted text clipped - 3 lines]
>> various item and not duplicate item but the item will be duplicate within
>> each different new job? How?
--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/200704/1
|
|
0
|
|
|
|
Reply
|
EMILYTAN
|
4/16/2007 8:15:21 AM
|
|
|
2 Replies
159 Views
(page loaded in 0.014 seconds)
Similiar Articles: Index include primiary key - microsoft.public.sqlserver ...... actual data location? Or this will make the search even quicker since the actual primary key is provided within ... the same (when A is >part of the clustered index key ... How can I reference a value from a previous record? - microsoft ...... have a simple inspection data table that contains the following five fields: 1. Primary Key 2. ... and try to accomplish this within a ... for any record(s) with the same ... A newbie paradox: is this a PK-FK (relationship) problem, or ...... the stock >>symbol as a primary/foreign key--that's fine, and it works, but now >>the problem is that within the same Stock ... real data and some invented data in the same ... background color record continious form - microsoft.public.access ...The data for the form is coming from a query, so I do not have a primary key. within the header I have placed an unbound ... Conditional Formating Same Color as Form ... conditional update of checkbox dependent on combo box in separate ...... when the combo box and checkbox are on different tables within > the same database, linked by the primary key ... Unbound fields can be used to display un-editable data, for ... Import data from excel - how to generalize ??? - microsoft.public ...... field names, data type and a sample of the data. There is >no primary key ... different patients who happen to have the same ... g. range of dates involved, role within the ... DataGridView is not updating in master/detail form - microsoft ...... info below: Items Table ItemID - Primary Key ... Also, this data is all contained within the app itself (in memory). ... table to display on your form and in the same ... Subreport Keeps Repeating Itself - microsoft.public.access.reports ...The field “Operator” is not the primary key but is found in tblEmployees ... Word forms and repeating data in fields within same document ... Subreport Keeps Repeating ... How show table text, not auto id number - microsoft.public.access ...Within this table is STATE ... has a Text field as the primary key instead of the autonumber. It makes good sense: since you don't want to allow 2 states with the same ... Many to Many Data Entry - microsoft.public.access.forms ...TblZones (with fields ZoneNo(primary key ... assigned to a zone that shares the same ... am looking to create a worksheet within my workbook to log open, save and data ... Ask Anantha: Inserting duplicate records in Primary key field... the way to inserting duplicate value in a primary key field. ... Now you have a enabled primary key constraint with a violated data: ... How to kill a process within ... The great primary-key debate | TechRepublicWhich makes for a better primary key: natural data ... two employees with the same name, the primary key ... apply a unique index to a primary key, which eliminates duplicate ... Eliminating Duplicated Primary Data - Microsoft ResearchIt’s not new—appliances that scrub hard drives and delete duplicate data ... within primary data, an area ... are not the same, they have a large amount of common data.” Visual Basic :: Primary Key (duplicate) - BigResource: Webmaster ...Primary Key (duplicate) hey, I'm ... tried the same way with other records it gave me the wrong one !! am sure of the primary key ... enter data into the field (primary key ... MS SQL Server :: Duplicate Key - BigResource: Webmaster Scripts ...Is it possible to duplicate a primary key? I would like my database to accept data with the same primary key. ... procedure when trying to find duplicate records within a ... 7/22/2012 3:49:24 PM
|