G
Guest
Hi
I have created a transactions table in an inventory application. I have also
created a DSum function that shows the quantity in stock on a form, by
calculating the number of incoming transactions minus the number of outgoing
transactions.
However, I would like to include this DSum function on a query. The query
asks the user for what make of shoe, name, colour and size they want. I would
like the DSum function to just show the quantity in stock in a particular
size (the one asked for). At the moment it calculates all incoming and
outgoing transactions in the transaction table.
Is this the right syntax to do the above:-
=IF ("[Size]"=Like[Enter Size] & "*",
(DSum("[Quantity]","tblTransactions","[Incoming_Transaction]=TRUE")-DSum("[Quantity]","tblTransactions","[Outgoing_Transaction]=TRUE")
I hope I explained it okay, if there are any queries, please enail me.
Thanks for all your help, Louisa
I have created a transactions table in an inventory application. I have also
created a DSum function that shows the quantity in stock on a form, by
calculating the number of incoming transactions minus the number of outgoing
transactions.
However, I would like to include this DSum function on a query. The query
asks the user for what make of shoe, name, colour and size they want. I would
like the DSum function to just show the quantity in stock in a particular
size (the one asked for). At the moment it calculates all incoming and
outgoing transactions in the transaction table.
Is this the right syntax to do the above:-
=IF ("[Size]"=Like[Enter Size] & "*",
(DSum("[Quantity]","tblTransactions","[Incoming_Transaction]=TRUE")-DSum("[Quantity]","tblTransactions","[Outgoing_Transaction]=TRUE")
I hope I explained it okay, if there are any queries, please enail me.
Thanks for all your help, Louisa