ComboBox showing specific datas

B

boubou

Hi everyone,
I have a form to mange my stock in Inventory. when a user choose a product
from a combobox, he can see in a dubform all the different locations in the
warehouse where we can actually find the product . Then the user can choose
to transfer the product from one of those locations to anotherone. therefore
i've used 2 combobox so the user can choose the 2 locations. But in the first
combobox, i want to see only the places where the product is actually located
not all the locations in the warehouse.
Any help would be greatly appreciated.
 
F

Frank Stone

you will have to put a query in the combo's row source
property and set the row source type to table/query
Here is the SQL I use to do it. you may have to change the
field names to suit your data. it select all locations,
location quantities and location trans dates(date of last
tranaction) where ItemID in location table = ItemID in
form.

SELECT LOC.LOC_WarehouseLoc, LOC.LOC_LocQty,
LOC.LOC_LocTransDate
FROM LOC
WHERE (((LOC.LOC_ItemID)=[Forms]![frmDeleteLOC]!
[txtItemID]))
GROUP BY LOC.LOC_WarehouseLoc, LOC.LOC_LocQty,
LOC.LOC_LocTransDate;
 
B

boubou

Thanks for your help Frank!

Frank Stone said:
you will have to put a query in the combo's row source
property and set the row source type to table/query
Here is the SQL I use to do it. you may have to change the
field names to suit your data. it select all locations,
location quantities and location trans dates(date of last
tranaction) where ItemID in location table = ItemID in
form.

SELECT LOC.LOC_WarehouseLoc, LOC.LOC_LocQty,
LOC.LOC_LocTransDate
FROM LOC
WHERE (((LOC.LOC_ItemID)=[Forms]![frmDeleteLOC]!
[txtItemID]))
GROUP BY LOC.LOC_WarehouseLoc, LOC.LOC_LocQty,
LOC.LOC_LocTransDate;
-----Original Message-----
Hi everyone,
I have a form to mange my stock in Inventory. when a user choose a product
from a combobox, he can see in a dubform all the different locations in the
warehouse where we can actually find the product . Then the user can choose
to transfer the product from one of those locations to anotherone. therefore
i've used 2 combobox so the user can choose the 2 locations. But in the first
combobox, i want to see only the places where the product is actually located
not all the locations in the warehouse.
Any help would be greatly appreciated.


.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top