getting records from a table

why do all projects have the same parts? It sounds like you don;t need to separate them out if this is the case.
 
They all have the same parts because ONE project results in a final product. let`s say it was a car they vere making, the car is put together by smaller parts, and the smaller parts ar made of som part if you know what I mean. Every car they made would be called a project and since all the cars are made of the same parts all the projects have the same parts list.

One other thing is that the parts have a status ID which the user of the database will edit as the project is going.
 
Right - I think I understand where you're coming from !

Add a field to the tblserialnum called 'status'. You can have this field as a combo box in the form view showing only the preferred opitions. This takes care of the status.

For the parts lists, you have a project number for each project, which is unique. It references the parts list required, which can be deplicated if needed. So there shouldn't really be an issue if you need to reference the same parts list for each project as the project number is the primary key.
 
I`m not sure if I understood what I am supposed to do with hte parts list... everytime I try to put something that alreadu exists in the parts list I just get the message"cannot save table, duplicated values". Is there something I have to do with the relationships?? I have lets`s say 4 projects, and when I`ve entered all the parts for the first project everything works just fine. But when I try to enter the parts for the second project in the tbl serialnum and try to save it I just get an error message saying "the changes you requested to the table were not successful because they would create duplicate values....."

Am I supposed to enter all the parts in the tblparts before I enter anything in the tblserialnum???
 
Hi Rune,

The reason for this is that 'Art No' in the tblserialnum is the primary key. You'll have to delete the relationship if you're going to be duplicating this 'art no', as it's a one to many relationship. Then delete the primary key setting from the 'art no' field.
 
What should I set as the primary key instead then?? do I have to have a primary key at all??
 
What about the relationship? just create a new one after I`ve deleted the primary key??
 
And what should I set the relationships to?Do I need one or two??
 
just leave relationships and primary keys alone for now and concentrate on getting the rest of it working !!!
 
It works fine except that when I choose a project, f.ex project 1 and then choose a part, say part 1 , I get a list of the parts, that`s great. but the thing is that I also lis the parts that belong to the same number but in project 2. If you know what I mean... It wont separate the parts that belongs to the different projects...
 

Users who are viewing this thread

Back
Top Bottom