Using value from subform to increase value in inventory table (1 Viewer)

logglogy

New member
Local time
Today, 02:57
Joined
May 24, 2023
Messages
2
Hello,

I have the following tables with fields
(translated to eng for better understanding)
T_PRODUCTS : PRODUCT_ID, NAME, STOCK, FINISHED,
T_DAYWORK : DAY_ID, DATE, WORKER
T_USAGE : USAGEID, PRODUCT (which is a lookup for product from table T_PRODUCTS by name), DONE, PRODUCTDAY_ID

So i create a form from the table T_DAYWORK and then i pull in T_USAGE as subform

So the user of this database when he opens the form (F_DAYWORK) for T_DAYWORK he fills in the date and which worker is using this (DAY_ID is assigned automatical).
(the subform is linked with DAY_ID to show only products that have the USAGEID same as DAY_ID)
Then he goes into subform clicks on PRODUCT field and then uses the arrow to pick which product he wants and in the 2nd field called DONE he adds the quantity (of products he finished that day).

After the user has finished picking items and quantity he has to press a button lets name it UPDATE. That button should pick the values from field DONE and add (+) that quantity to the field FINISHED to corresponding porduct items that the user has picked.

I tried to make a query and I tried to make a button with A LOT of googling and even chatgpt, but I didn't make it. I am a novice in access.
Can you help me with this? If you need details I can send you the database or even the ppt I made for this

Thx in advance,
logy
 

mike60smart

Registered User.
Local time
Today, 01:57
Joined
Aug 6, 2017
Messages
1,904
Hello,

I have the following tables with fields
(translated to eng for better understanding)
T_PRODUCTS : PRODUCT_ID, NAME, STOCK, FINISHED,
T_DAYWORK : DAY_ID, DATE, WORKER
T_USAGE : USAGEID, PRODUCT (which is a lookup for product from table T_PRODUCTS by name), DONE, PRODUCTDAY_ID

So i create a form from the table T_DAYWORK and then i pull in T_USAGE as subform

So the user of this database when he opens the form (F_DAYWORK) for T_DAYWORK he fills in the date and which worker is using this (DAY_ID is assigned automatical).
(the subform is linked with DAY_ID to show only products that have the USAGEID same as DAY_ID)
Then he goes into subform clicks on PRODUCT field and then uses the arrow to pick which product he wants and in the 2nd field called DONE he adds the quantity (of products he finished that day).

After the user has finished picking items and quantity he has to press a button lets name it UPDATE. That button should pick the values from field DONE and add (+) that quantity to the field FINISHED to corresponding porduct items that the user has picked.

I tried to make a query and I tried to make a button with A LOT of googling and even chatgpt, but I didn't make it. I am a novice in access.
Can you help me with this? If you need details I can send you the database or even the ppt I made for this

Thx in advance,
logy
Hi Can you upload your Db ?
 

CJ_London

Super Moderator
Staff member
Local time
Today, 01:57
Joined
Feb 19, 2013
Messages
16,607
It is generally considered bad practice to update a total’s field- so many things can go wrong from entering a wrong amount to entering in the wrong order or entering more than once

better to just summarise as and when required

up to you but you will need a lot of extra functionality to make sure you don’t get wrong values
 

logglogy

New member
Local time
Today, 02:57
Joined
May 24, 2023
Messages
2
Hi Can you upload your Db ?
I am not at work atm, so I recreated it at home. I think you will understand once you open it. I am a beginner in access. So if I am doing something the wrong way I would love to hear your opinion.
 

Attachments

  • PRODUCTION.accdb
    640 KB · Views: 78

Users who are viewing this thread

Top Bottom