Dear all,
If i have a continuous form for data entry using barcode reader
Item code, item name quantity , price and total price
When i scan an item it creat one row with quantity of 1 , when i scan the same item it creat another row of quantity one
I want to mix this two row in one row and quantity of 2 when i scan the same item twice for one invoice
How to do that plz
Regards
How to sum or unify quantity of two rows During data entry
-
- BronzeLounger
- Posts: 1234
- Joined: 01 May 2016, 09:58
-
- Administrator
- Posts: 78534
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: How to sum or unify quantity of two rows During data ent
I would leave the table as it is, and use a totals query that groups the records by invoice and item and sums quantity.
Best wishes,
Hans
Hans
-
- BronzeLounger
- Posts: 1234
- Joined: 01 May 2016, 09:58
Re: How to sum or unify quantity of two rows During data ent
Thanks a lot for the quick reply
What i mean is on the data entry form when i scan the sane item twice it auto refresh and show one row for the same item with quantity 2 and if i scan another item it create another row this for sake form in an small market
I hope you got my point
What i mean is on the data entry form when i scan the sane item twice it auto refresh and show one row for the same item with quantity 2 and if i scan another item it create another row this for sake form in an small market
I hope you got my point
-
- Administrator
- Posts: 78534
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: How to sum or unify quantity of two rows During data ent
I understand your question, but I think that would be difficult to implement.
Best wishes,
Hans
Hans
-
- BronzeLounger
- Posts: 1234
- Joined: 01 May 2016, 09:58
Re: How to sum or unify quantity of two rows During data ent
Ok dear Hans
Thanks any way i thought it can be done using some if functions :)
Regards
Thanks any way i thought it can be done using some if functions :)
Regards
-
- Administrator
- Posts: 78534
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: How to sum or unify quantity of two rows During data ent
Perhaps you could do the following:
The main form is unbound (i.e. its record source is blank). It has controls for all fields that need to be entered.
The main form has a continuous subform bound to the relevant table. The subform is not linked to the main form.
The main form has a command button to save the data that have been entered.
If the combination of invoice and item exists in the table, the quantity is added to the existing record.
Otherwise, a new record is created.
In both cases, the subform is requeried after this, and the controls on the main form are cleared (if desired).
The main form is unbound (i.e. its record source is blank). It has controls for all fields that need to be entered.
The main form has a continuous subform bound to the relevant table. The subform is not linked to the main form.
The main form has a command button to save the data that have been entered.
If the combination of invoice and item exists in the table, the quantity is added to the existing record.
Otherwise, a new record is created.
In both cases, the subform is requeried after this, and the controls on the main form are cleared (if desired).
Best wishes,
Hans
Hans
-
- BronzeLounger
- Posts: 1234
- Joined: 01 May 2016, 09:58
Re: How to sum or unify quantity of two rows During data ent
Thanks a lot for your kind reply i think it became more complicated than what i expected :)
Thanks again
Regards
Thanks again
Regards