I have a sample of my database attached.
In the sample, I have a Receiving table that gets updated when a material (Boxes/Bags) is received. I tried to create an update query so that I could run it on open of a form.
This update query will run so that when something is received or "Completed", the earliest date of a particular type of box will be selected as "YES" for CurrentLotCode.
I had to run 2 queries to get the correct info to be based off the MinofDate Received. (this may be wrong!!!) The results for these queries come out with 37 entries (which is correct) that are not completed lot codes and the earliest available for each type according to date received.
I then created the update query and instead of updating 37 items, it is updating 50! It will select the oldest Lot Code that hasnt been completed for each type, but will also randomly select others of the same type that are newer (received after the one that should be correct)
Can someone take a look at it for me? You may want to go to table first. It is setup how the selection of current lot code should be. When you run the update query, go back to the table and see that multiple selections have been made for certain box types (not all) at random.
THANKS!!!
In the sample, I have a Receiving table that gets updated when a material (Boxes/Bags) is received. I tried to create an update query so that I could run it on open of a form.
This update query will run so that when something is received or "Completed", the earliest date of a particular type of box will be selected as "YES" for CurrentLotCode.
I had to run 2 queries to get the correct info to be based off the MinofDate Received. (this may be wrong!!!) The results for these queries come out with 37 entries (which is correct) that are not completed lot codes and the earliest available for each type according to date received.
I then created the update query and instead of updating 37 items, it is updating 50! It will select the oldest Lot Code that hasnt been completed for each type, but will also randomly select others of the same type that are newer (received after the one that should be correct)
Can someone take a look at it for me? You may want to go to table first. It is setup how the selection of current lot code should be. When you run the update query, go back to the table and see that multiple selections have been made for certain box types (not all) at random.
THANKS!!!