View Single Post
  #4  
Old May 19th, 2010, 02:19 PM posted to microsoft.public.access.forms
Daryl S[_2_]
external usenet poster
 
Posts: 881
Default help needed with a combo box

Alanb -

You need to set the row source for the combo box on tab 2 to be a query like
this (use your subform name that is on the first tab, or if not in a subform,
just reference the field):

SELECT [Product Code], [Item description]
FROM TblPriceList
WHERE [Supplier Name] = Forms![Frm
Suppliers].[SubformNameOnTab1].Form.[Supplier Name]

You may need to requery this combobox in the AfterUpdate event of the
Supplier Name on tab 1.

If you have problems, post your SQL or the code that is not working.

--
Daryl S


"alanb" wrote:

My main tables/fields are;
TblOrders
AB ref. Number , Order date, contract number, Supplier Name, job details, etc.

TblSuppliers
Supplier Name, address, tel, fax, email, contact name, etc.
TblPriceList
Supplier Name, Product Code, Item description, unit, Price, cost code, etc.
TblWorkItems
Work item ID, AB ref. Number, product code, item description, quantity, unit,
price, extended price.

My forms are as follows;
Frmorders
Tab one, Order Details, included button to print order (report)
Tab two, subfrmWorkItems (Linked with AB ref number), user to enter products
required.

Frm Suppliers
Tab one, Supplier Details
Tab two, subfrmPriceList (linked to supplierName)
Tab three, subfrmOrderHistory

.