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 » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

prevent repeatition in fields which is not a primary key



 
 
Thread Tools Display Modes
  #1  
Old November 5th, 2006, 09:47 AM posted to microsoft.public.access.forms
Matilda
external usenet poster
 
Posts: 21
Default prevent repeatition in fields which is not a primary key

I have two table with the relationship 1: many
Table 1 fields are A, B, c where c is the primary key
Tabe2 fileds are D, C, E, . whre D is the primary key
I are using subform to capture data but I do not want to repeat the same
values for C and E in table 2 . how do i go about it.
  #2  
Old November 5th, 2006, 12:01 PM posted to microsoft.public.access.forms
Rick Brandt
external usenet poster
 
Posts: 4,354
Default prevent repeatition in fields which is not a primary key

Matilda wrote:
I have two table with the relationship 1: many
Table 1 fields are A, B, c where c is the primary key
Tabe2 fileds are D, C, E, . whre D is the primary key
I are using subform to capture data but I do not want to repeat the
same values for C and E in table 2 . how do i go about it.


Open Table2 in design view and then from the menu choose View - Indexes. You
want to add a unique index that contains both fields C and E. It will look
like...

IndexName C
E

(*) Unique (found at the bottom of the dialog)

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com


 




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:51 PM.


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