![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hallo Is there someone here who could help me? I don’t anything about access, but I need a template which I could use when I buy / sell parts. I also should know how many of the parts I have in the warehouse. I don’t know if I should use three tables one for both buying and selling parts, and one for keeping me updated on how many of these parts is in the warehouse. The information I need in the table is Date, Ware description, Quantity, Price each, Costs, Total, Poul When you open Access you can open a database or you can select a |
#3
| |||
| |||
|
|
Hallo Is there someone here who could help me? I don’t anything about access, but I need a template which I could use when I buy / sell parts. I also should know how many of the parts I have in the warehouse. I don’t know if I should use three tables one for both buying and selling parts, and one for keeping me updated on how many of these parts is in the warehouse. The information I need in the table is Date, Ware description, Quantity, Price each, Costs, Total, Poul -- |
#4
| |||
| |||
|
|
I would use the following tables, not need to capture totals since it can be calculated using a query (or two) tblItem itemId description qtyOnHand tblItemTransaction transactionId (autonumber) itemId transType (S - sale, P - purchase, A - adjustment) transDate transQty transCost transPrice qryTransQty ----------- select itemId , sum(IIf(transType = 'S', -transQty, IIf(transType = 'P', transQty, transQty) as tQty from tblItemTransaction group by itemId qtyQtyOnHand ------------ select tblItem.itemId , tblItem.qtyOnHand + qryTransQty.tQty as onHand from tblItem left join qryTransQty on tblItem.itemId = qryTransQty.itemId the reason, tblItem as qtyOnHand, it allows you to flush transactions out of tblItemTransaction and store the next quantity as qtyOnHand of course, the flushing activity needs to deal with costing, be it average cost, fifo cost, last cost,.... |
#5
| |||
| |||
|
|
I would use the following tables, not need to capture totals since it can be calculated using a query (or two) tblItem itemId description qtyOnHand tblItemTransaction transactionId (autonumber) itemId transType (S - sale, P - purchase, A - adjustment) transDate transQty transCost transPrice qryTransQty ----------- select itemId , sum(IIf(transType = 'S', -transQty, IIf(transType = 'P', transQty, transQty) as tQty from tblItemTransaction group by itemId qtyQtyOnHand ------------ select tblItem.itemId , tblItem.qtyOnHand + qryTransQty.tQty as onHand from tblItem left join qryTransQty on tblItem.itemId = qryTransQty.itemId the reason, tblItem as qtyOnHand, it allows you to flush transactions out of tblItemTransaction and store the next quantity as qtyOnHand of course, the flushing activity needs to deal with costing, be it average cost, fifo cost, last cost,.... |
|
itemId description qtyOnHand -- |
|
tblItemTransaction transactionId (autonumber) itemId transType (S - sale, P - purchase, A - adjustment) transDate transQty transCost transPrice |
#6
| |||
| |||
|
|
Roger wrote: I would use the following tables, not need to capture totals since it can be calculated using a query (or two) tblItem itemId description qtyOnHand tblItemTransaction transactionId (autonumber) itemId transType (S - sale, P - purchase, A - adjustment) transDate transQty transCost transPrice qryTransQty ----------- select itemId * * *, sum(IIf(transType = 'S', -transQty, * * * * * *IIf(transType = 'P', transQty, * * * * * *transQty) as tQty * from tblItemTransaction *group by itemId qtyQtyOnHand ------------ select tblItem.itemId * * *, tblItem.qtyOnHand + qryTransQty.tQty as onHand * from tblItem left join * * * *qryTransQty on tblItem.itemId = qryTransQty.itemId the reason, tblItem as qtyOnHand, it allows you to flush transactions out of tblItemTransaction and store the next quantity as qtyOnHand of course, the flushing activity needs to deal with costing, be it average cost, fifo cost, last cost,.... *Hello Roger As I write I'm totaly newbee in access, is the first two parts tables, and the last tow sections is this queryes? Poul Is this table one? * tblItem> itemId description qtyOnHand -- and this table two? tblItemTransaction transactionId (autonumber) itemId transType (S - sale, P - purchase, A - adjustment) transDate transQty transCost transPrice- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text - |
#7
| |||
| |||
|
|
yes to all your questions |
![]() |
| Thread Tools | |
| Display Modes | |
| |