Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / March 2008

Tip: Looking for answers? Try searching our database.

multiple entry of a number

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
suej68 - 16 Mar 2008 06:51 GMT
I have a database that requires a payroll number to be entered multiple
times, the payroll number is the primary key and a number of reports are
required to be printed out. the data base works wonderfully until you want to
enter the payroll number again for another record and it doesnt like it, how
to I get around this.
Steve Schapel - 16 Mar 2008 09:25 GMT
Sue,

If the payroll number is the primary key, the values in this field *must
be* unique.  That's part of the meaning of the concept of primary key.
You won't be able to enter the same payroll number more than once in
this table.

Sorry, I don't think I can advise more specifically than that, without
knowing more about your overall database and the purpose of this and any
related tables.

Signature

Steve Schapel, Microsoft Access MVP

> I have a database that requires a payroll number to be entered multiple
> times, the payroll number is the primary key and a number of reports are
> required to be printed out. the data base works wonderfully until you want to
> enter the payroll number again for another record and it doesnt like it, how
> to I get around this.
Linq Adams - 16 Mar 2008 14:28 GMT
As Steve has explained, a Primary Key has to be unique(i.e. can only be used
once) to a given table. The number can only be used again in a related table,
where it becomes a Foreign Key. The Foreign Key can be use multiple times in
this related table.

A simplified example would be:

PayrollTable:

PayrollNumber - Primary Key (Can only appear once in this table)
StartDate
EndDate

PayDayTable:

EmployeeID
PayrollNumber - Foreign Key (Can appear multiple times in this table)
EmployeeHours

Signature

There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000/2003

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.