Access noob basic form problem

llasher

llasher
Local time
Today, 08:59
Joined
Jan 5, 2005
Messages
5
I am a newbie to Access, & have a reached an impasse. I am trying to design a form in which you can enter basic ID details of a patient, and then in a subform enter billing details for multiple consultations on different dates. Really simple, but each time I try to enter a second record in the subform I get an error msg:

"The changes you requested to the table were not successful because they would create duplicate values in the index, primary key, or relationship. Change the data in the field or fields that contain duplicate data, remove the index, or redefine the index to allow for duplicate entries."

There must be a fundamental concept of Access db design that I am missing, as I am sure there is a way to have a main form that has a relationship to multiple sequential records in a subform.

A screenshot of the error msg is here http://users.bigpond.net.au/llasher/work/access.jpg. I realise this error is also part of a bug in Access 2003, although I don't think that is what's causing my problem.

Hopefully someone can understand what I am asking and help . :o
 
the error message sounds like ur using the same number more than once.
in table design make sure that you have the ID set to no duplicates and indexed.
 
in table design make sure that you have the ID set to no duplicates and indexed
Thanks but that didn't work. What I am doing is:

Created one table with a primary key called "UR" (6 characters), and other fields such as name etc. Created a second table with the same primary key called "UR" (I gather all tables should have a primary key) where I enter dates.

I then created a relationship between the two tables using UR.

What I have done in the forms is create a form with the first table, then a subform with the second. What I wanted to do was enter the UR in the first form, then enter multiple dates for that UR in the subform. THe problem is as soon as I try to enter a second record (date) for the same UR in the subform, I get the error msg.

My (very basic) sense is that it doesn't like different data entered for the same UR, so what I'm asking is how to set up an Access db to allow this. I imagine the mistake I am making is based on a fundamental misunderstanding of primary keys and relationships. :o

Thanks in advance :eek:
 
if possible try posting the database or screenshot of table entitys and relationships, maybe som1 can help better that way ;)
 
Think I sorted it out. Need to have different primary keys for each table? Now I have a different issue :rolleyes:
 

Users who are viewing this thread

Back
Top Bottom