Ok Guys first of all thank you to everyone who has replied, secondly ……. Let me start again
I have one database that I have made from scratch, with little experience of Access, I programmed Lotus Approach in the Nineties and tbh I preferred it but alas is no more.
In this database I have many tables, and I know if I had my time again I would do it differently to how it is, I know it is no where near perfect.
Two tables I am having difficulty with is the stock table and the order detail. When I raise a customer order it uses the Order table, and within in that uses a sub form in the Order Detail table, this keeps track of the items sold (from the stock table) colour, size and price amongst other things.
Now my company has grown somewhat I need to add more stock items and would like things to be kept organised. In my current stock table stock numbers were allocated willy nilly and sort of in numeric order, now I would like a bit more organisation, so for example all t shirts will begin with 804xx stock number, and babywear will start with 803xx. There are then certain stock numbers that will overlap, in the new regime I might have to use a stock number that was used previously by something else.
At the moment if I change the stock number in the stock table, I lose all the Order Detail information in the Order Detail Table. Of course what I would like to happen is that I change the stock number in the stock table and all the stock numbers change in the Order Detail Table.
I have looked into how I set up the relationship and see that they are linked by the stock number, why is it that I lose the Order Detail Information? When I check the data integrity properties, there is no data integrity. If I then change it to enforce the data integrity I get the error message saying that there are related records in another table.
When I run a query to check the related records I see that there is a record for each stock record in each Order Detail Record giving some 2.7 billion records
The StockNumber field is neither a Primary Key or a Autonumber. They are unique so I do not get 2 StockNumbers the same.
I am not too sure what other information I can give you and I dont know if you know what I am trying to explain. Having used Access for a number of years now (about 4) I am toying with the idea of starting all over again and then export/import the data. I am very busy though so may end up paying someone to redesign it for me.
Thanks once again for your answers and hopefully I have done gud in explaining this time