ComboBox showing specific datas

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
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;
 
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.


.
 
Back
Top