473,387 Members | 1,621 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Relationship Problem

Hello I trying to learn access I am actually taking a class for I had to do an assignment but I am stuck in creating a relationship I get error and don't know how to fix them. Would someone show me what I doing wrong thanks. Primary key on DepartmentName
I got in table one DepartmentName, Budgetcode, Officenumber, and phone
Primary key on Employee Number
On the other one EmployeeNumber, FirstName, LastName, Department, phone, Email.

I keep getting Error 3201 you cannot add or change a record because a related record is required in table (name)
Can someone tell how can I create a relationship
Jan 26 '17 #1
2 1005
jforbes
1,107 Expert 1GB
I wouldn't ignore the error you are getting. It's trying to tell you that you can't create the Relationship on the Tables since there is Data in it that would not satisfy the Relationship you are attempting to create. Like a Department in the Employees Table that doesn't exist in the Department Table. (I'm guessing that is the relationship you are attempting to make)

To create your Relationship, you have to
  • either get your Data to line up. Make sure Every Single Department in your Employee Table exists in your Department Table.
  • or delete your data, create your relationship, and add your data back.
Jan 26 '17 #2
NeoPa
32,556 Expert Mod 16PB
Hi Erik.

We have to be very careful not to do your assignment for you, nor be understood to have done so. Nevertheless, with a clearly specified question we can give helpful pointers.

What is unclear to me is why the error message indicates you're trying to add a new record (Presumably for an Employee of a Department whose record you haven't added yet.) yet the question appears to be about how to create the relationship.

Access is an incredibly powerful tool, but be very clear on this point - Precision and accuracy are paramount if you're to make any progress. Wooly thinking and a 'sort of general' understanding of what you're trying to achieve will get you nowhere very quickly.

Specifying your question clearly and accurately will have two immediate benefits :
  1. You will understand the situation more clearly yourself. Once you put that effort in it will help. It still does for me when I'm struggling.
  2. It will allow experts who wish to help a much better chance of providing helpful comments.

Let us know if you still have issues after reading these posts.
Jan 27 '17 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

166
by: Graham | last post by:
This has to do with class variables and instances variables. Given the following: <code> class _class: var = 0 #rest of the class
2
by: tomh | last post by:
I need to have TextBoxes included in the ListItems of a RadioButtonList. So it would look something like this: <asp:RadioButtonList runat="server" id="rblError" CellPadding="3"> ...
0
by: ward | last post by:
Greetings. Ok, I admit it, I bit off a bit more than I can chew. I need to complete this "Generate Report" page for my employer and I'm a little over my head. I could use some additional...
11
by: Peted | last post by:
Im using c# 2005 express edition Ive pretty much finished an winforms application and i need to significantly improve the visual appeal of the interface. Im totaly stuck on this and cant seem...
1
by: =?Utf-8?B?VHJ1cHRpIERhbGlh?= | last post by:
Hi to all, I am new in this newsgroup and new to .NET also. I am creating an application where I have to perform Mail Merge from my program. I have created a form which contain RTB and user can...
1
by: Mufasa | last post by:
I have a need to have a program open a Word document and display it to the user. The user will not be able to touch the document - it will be read only. Anybody have any code or links that do...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.