No unique index found for the referenced field of the primary table

bernese

New Member
Joined
Oct 24, 2015
Messages
13
I have an assignment where I need to design a database with special instructions. Within the db design are 2 tables: one table (Purchase Orders) with 2 primary fields identified (Purchase number and Computer Part #), the second Table is the Cash Disbursements Table that has Purchase number as a foreign key. I am trying to create relationships between these 2 tables using the Purchase Number key, but get the error noted above in the title. I do see that some of the Purchase numbers are duplicated in my tables. How do I get around this and design the table as requested in the instructions: with Purchase Orders Table having both Purchase Number and Computer Part Number as primary keys and linking the Purchase Number to the foreign key in the Cash Disbursements Table?

Any assistance would be greatly appreciated.
 

Micron

Well-known Member
Joined
Jun 3, 2015
Messages
1,763
You are probably trying to enforce referential integrity, which you cannot do in this situation. If you were not told to do that, then don't and the message should go away.
For what it's worth, the assignment requirements seem bizzare. A PO table should be a header with PO number, create date, status, etc. etc. A PO line items table is where part numbers or their reference ID's should go.
 

Forum statistics

Threads
1,081,702
Messages
5,360,743
Members
400,595
Latest member
T_Dubs

Some videos you may like

This Week's Hot Topics

  • VBA (Userform)
    Hi All, I just would like to know why my code isn't working. Here is my VBA code: [CODE=vba]Private Sub OKButton_Click() Dim i As Integer...
  • List box that changes fill color
    Hello, I have gone through so many pages trying to figure this out. I have a 2020 calendar that depending on the day needs to have a certain...
  • Remove duplicates and retain one. Cross-linked cases
    Hi all I ran out of google keywords to use and still couldn't find a reference how to achieve the results of a single count. It would be great if...
  • VBA Copy and Paste With Duplicates
    Hello All, I'm in need of some input. My VBA skills are sub-par at best. I've assembled this code from basic research and it works but is...
  • Macro
    is it possible for a macro to run if the active cell value is different to the value above it
  • IF DATE and TIME
    I currently use this to check if date has passed but i also need to set a time on it too. Is it possible? [CODE=vba]=IF(B:B>TODAY(),"Not...
Top