UBcollegeboy
New member
- Local time
- Today, 12:57
- Joined
- May 27, 2008
- Messages
- 4
Hello all,
So I am working on this for work and I don't know why the records are duplicating when I prese the add button. I have only taken a class on Access so my knowledge is limited but as an Intern I had to make this.I will try to explain this the best I can.
I have included the database, it is very simplistic and not very big because it is my test one without all of the data. If you go to the Special Mix form, you will see that the purpose of this database is to create Mixes (identified by Mix #) from the raw materials that are in the inventory. I made the button so that it will add the item from inventory into the lot allocation subform. However, my first problem is that, in the form, as you can see that I have one record already in the Lot Allocation subform (ZnO2, weight - 1000, lot #1 ) and that was taken from the inventory which was originally 2000 kgs until I added 1000 kg of it into lot allocation and 1000 kg is subtracted from the inventory because it is no longer in there. My problem is that i had to put in the first record manually for Mix #2. I had to go into the Raw Material Inventory and manually allocate the 1000 kgs from inventory and put it into lot allocation. You can try this by deleting that record from lot allocation and try adding it back in and you will see that nothing happens. However if I manually put in the first record, the rest of records from inventory start adding in automatically.
Ok problem 2. Say I add part of Y2O3 in now with the 1000kgs ZnO2 already in there in Mix #2 and say I take 2000 kgs from inventory and put in lot allocation subform, I just press the button in available inventory subform and it prompts asking for 4000 kgs but say no and it will ask for you to put in a number so we put 2000kgs. Ok so this work, 2000 kgs of Y2O3 is taken out of inventory and is put into lot allocation subform giving the total mixture 3000kgs. Say this mixture is done and I want to make another mixture. So now i got onto the next record in the main form and I want to add the rest of that ZnO2 becasue I used 1000kgs of it already and i have 1000kgs left and i want to use it for this mixture (mix #3). I click add and it prompts if i want to add all 1000kgs, I say yes, and you can see that it adds 2 records of ZnO2, from that lot, leaving inventory to be -1000 kgs rather than 0. I set it so that if its weight is 0, it won't show up in the available inventory. But what i don't understand is why it entered it into lot allocation subform twice. Logically, it is taking an extra 1000 kgs of ZnO2 out of inventory when it isn't there. There was 1000 kgs of it but it is allocating 2000 kgs of it. I just want the 1000kgs of ZnO2 to go into lot allocation leaving no ZnO2 lot # 1 left in inventory.
I know it might be confusing but if you can mess around with it you will see what i mean, and if you guys can give me any suggestions I would be greatly appreciative.
PS. Ignore the text boxes you see at the left of lot allocation subform, I put it there for calculation purposes. Also, in order to add another mix # (main form) you must first put in a mixer name on the top left, just choose any one.
Andrew
So I am working on this for work and I don't know why the records are duplicating when I prese the add button. I have only taken a class on Access so my knowledge is limited but as an Intern I had to make this.I will try to explain this the best I can.
I have included the database, it is very simplistic and not very big because it is my test one without all of the data. If you go to the Special Mix form, you will see that the purpose of this database is to create Mixes (identified by Mix #) from the raw materials that are in the inventory. I made the button so that it will add the item from inventory into the lot allocation subform. However, my first problem is that, in the form, as you can see that I have one record already in the Lot Allocation subform (ZnO2, weight - 1000, lot #1 ) and that was taken from the inventory which was originally 2000 kgs until I added 1000 kg of it into lot allocation and 1000 kg is subtracted from the inventory because it is no longer in there. My problem is that i had to put in the first record manually for Mix #2. I had to go into the Raw Material Inventory and manually allocate the 1000 kgs from inventory and put it into lot allocation. You can try this by deleting that record from lot allocation and try adding it back in and you will see that nothing happens. However if I manually put in the first record, the rest of records from inventory start adding in automatically.
Ok problem 2. Say I add part of Y2O3 in now with the 1000kgs ZnO2 already in there in Mix #2 and say I take 2000 kgs from inventory and put in lot allocation subform, I just press the button in available inventory subform and it prompts asking for 4000 kgs but say no and it will ask for you to put in a number so we put 2000kgs. Ok so this work, 2000 kgs of Y2O3 is taken out of inventory and is put into lot allocation subform giving the total mixture 3000kgs. Say this mixture is done and I want to make another mixture. So now i got onto the next record in the main form and I want to add the rest of that ZnO2 becasue I used 1000kgs of it already and i have 1000kgs left and i want to use it for this mixture (mix #3). I click add and it prompts if i want to add all 1000kgs, I say yes, and you can see that it adds 2 records of ZnO2, from that lot, leaving inventory to be -1000 kgs rather than 0. I set it so that if its weight is 0, it won't show up in the available inventory. But what i don't understand is why it entered it into lot allocation subform twice. Logically, it is taking an extra 1000 kgs of ZnO2 out of inventory when it isn't there. There was 1000 kgs of it but it is allocating 2000 kgs of it. I just want the 1000kgs of ZnO2 to go into lot allocation leaving no ZnO2 lot # 1 left in inventory.
I know it might be confusing but if you can mess around with it you will see what i mean, and if you guys can give me any suggestions I would be greatly appreciative.
PS. Ignore the text boxes you see at the left of lot allocation subform, I put it there for calculation purposes. Also, in order to add another mix # (main form) you must first put in a mixer name on the top left, just choose any one.
Andrew