1 (edited by v_pozidis 2023-11-27 16:36:21)

Topic: add and remove qty (Any help!!!)

Good evening, I have a small program (not complete) in which I want to add and remove one by one or many codes of their quantities from the database. But I can also add and remove quantity  from codesof the database using excel files. Can someone help me??

Post's attachments

Attachment icon tameion.zip 326.08 kb, 56 downloads since 2023-11-24 

Re: add and remove qty (Any help!!!)

Any help please!!!!!

Re: add and remove qty (Any help!!!)

Hi,
I'm not entirely sure what you are wanting to do.
Perhaps you can give us some more details (ideally with an example of what should happen).
Also, I don't understand how you want Excel to work with your program.
Regards,
Derek.

4 (edited by v_pozidis 2023-11-28 15:56:28)

Re: add and remove qty (Any help!!!)

Sorry for the delay. What I want is to type the code and from the quantity it has (qty) add and subtract quantity, as it is in a warehouse, when you sell you subtract and when you receive a new additional code quantity. And what I'm asking with the excel file is like a receipt with many codes that need to be added to the inventory,automatically (importing the excel file instead typing one by one all the codes with the qty's), where the code is in the database to add the quantity (qty). With the same reasoning and when a sale is made, the corresponding quantity should be removed from the database. So I'm asking for something like a small warehouse works. Sorry for my English!!! Its google translated

Re: add and remove qty (Any help!!!)

Hi,
Perhaps you could try it something like this (see attached).
On Form1, you can
1.  manually adjust quantities by selecting a part number from the combobox, typing in an adjustment amount and the qty is updated.
2.  update adjustments in batch by uploading a CSV file.  Specifically,
2.1  click on the 'import' button to load the CSV into the 'csvimport' table.
2.2  click on the 'view import' button to review what is going to be updated - it will also show any data mismatches.
2.3  click on the '⇈' button to update the quantities in the 'tameio' table.
Maybe this gives you some ideas.
If anything is not clear, just shout.
Regards,
Derek.

Post's attachments

Attachment icon tameion2.zip 488.15 kb, 59 downloads since 2023-11-29 

Re: add and remove qty (Any help!!!)

Thank you Derek.

Re: add and remove qty (Any help!!!)

Something I just saw. If the same code exists twice in the excel file, it only gets one. Is there a solution if the code is there more than once?

Re: add and remove qty (Any help!!!)

Hi,
I didn't realise that the part number could appear multiple times in your input file.
But it's a easy fix - just change the script to 'select sum(adjustment)' from .... etc etc.
Please see the amended attachment.
Derek.

Post's attachments

Attachment icon tameion3.zip 488.22 kb, 50 downloads since 2023-12-01 

Re: add and remove qty (Any help!!!)

Yes Derek!!!!!! The new question is (you see the questions are coming always too late when I have send the message) . When in the excel file is a part number that doesn't exist in the tablegrid can it show as a warning to add it in the database ????

Re: add and remove qty (Any help!!!)

Hi,
I thought that the example I sent earlier already did this.
When you have loaded your .csv file, you can click on the 'view import' button and any parts that do not exist are highlighted with a 'not found' warning.
You can simply place a button on the 'frmviewimport' form to create a new record if required.
Derek.

Post's attachments

Attachment icon screenshot.jpg 98.45 kb, 11 downloads since 2023-12-01 

Re: add and remove qty (Any help!!!)

I understood Derek....Thank you again!!!!