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  

Table Design



 
 
Thread Tools Display Modes
  #1  
Old April 3rd, 2009, 07:33 PM posted to microsoft.public.access.tablesdbdesign
QB
external usenet poster
 
Posts: 150
Default Table Design

I have a table with 3 fields

EntryId (Primary Key - AutoNumber)
EmployeeNo
EntryYear

what do I need to do so that an EmployeeNo can have multiple entries, but
only one per year? Is this done in the design of the table or some other
method?

Thank you,

QB
  #2  
Old April 3rd, 2009, 09:04 PM posted to microsoft.public.access.tablesdbdesign
Fred
external usenet poster
 
Posts: 1,451
Default Table Design

Create a 2 field index employeeno and entryyear and set it for unique

  #3  
Old April 3rd, 2009, 09:17 PM posted to microsoft.public.access.tablesdbdesign
QB
external usenet poster
 
Posts: 150
Default Table Design

Sorry for my ignorance, but how do I do this exactly. If it makes a
difference I am using Access 2003.

Thank you,

QB



"Fred" wrote:

Create a 2 field index employeeno and entryyear and set it for unique

  #4  
Old April 3rd, 2009, 10:27 PM posted to microsoft.public.access.tablesdbdesign
Fred
external usenet poster
 
Posts: 1,451
Default Table Design


No Problem

I'm no expert either but this works for me:

In table design view hit the indexes icon. In the ensuing dialog box:

On the first line make up an index name, (e.g. "EntryCheck") and choose
your first field (e.g. EmployeeNo)

On th second line, leave the index name blank, and choose your second filed
(e.g. EntryNo)

Click on the index name in the first column, and at the bottom of the
dialog box by "unique" choose "Yes"

Hope that helps.


 




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 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.