making combo box base on table

  • Thread starter Thread starter MJ
  • Start date Start date
M

MJ

hi all,

let say i have transaction table
(transID,costumer,product,Sale price) 0f 100
transaction.And there are 5 products range on that table.

now i want to make form whereby i can choose range of
product(in combo box) base on my table and if i enter "OK"
button it will create new query from original table base
on product ive chosen.

what i can do so far is make a list of product but it have
100 list that base on transaction not exacly 5 products.

please help
 
To show only 5 items in the comboBox list, change the
RowSource SQL to something along the lines of
SELECT DISTINCT product from TransactionTable;

If the form that you want to use to display the rows from
the transaction table only for the selected product is the
one that has the combo Box, then you should put code along
the lines of
DoCmd.ApplyFilter ,"product = " & cmbProduct.Value
in the AfterUpdate eventhandler for the combo box

If the form is a different from the one that has the
comboBox, then you should put code along the lines of
DoCmd.OpenForm "OtherFormName" ,,, "product = " &
cmbProduct.Value
in the AfterUpdate eventhandler

Hope This Helps
Gerald Stanley MCSD
 
Back
Top