- Joined
- Oct 26, 2006
- Messages
- 1
- Reaction score
- 0
Hello Everyone:
I want to start by saying I am new to this, so please bare with me.
I am trying to put together a Purchase Order database for my employer and while I have tinkered with Access, I know very little.
I am using a slightly modified version of the Inventory database that comes with 2002 - basically I've added 2 fields to the products table and products form. One is for our item number and the second is for our suppliers' item number.
What my employer would like is when entering a purchase order, to only have the products supplied by the supplier from whom the PO is for .... so what I have tried to do is code a unbound Combo Box sql in the main form with
SELECT Suppliers.SupplierName FROM Suppliers ORDER BY Suppliers.SupplierName;
Set the AfterUpdate to (among others)
Private Sub SupplierID_Combo_AfterUpdate()
Me![Purchase Orders Subform].ProductID.Requery
End Sub
Then in the subform (datasheet) set a unbound Combo Box
SELECT Products.*, Products.ProductID, Products.CongressItemNo, Products.SupplierItemNo, Products.ProductName, Products.UnitPrice, Products.Supplier FROM Products WHERE (((Products.Supplier)=Forms![Purchase Orders]!SupplierID_Combo));
This works somewhat ... expect ... I select a product and everything is filled in except a quantity box - which is correct .... but once I enter the quantity another record/item is added with the exact same product info... quantity blank .... if I select a second product the first chages to match the second ... if I select a third the first 2 change to match the third ... and so on...
Any thoughts help? PLEASE! Don't have much hair left!! LOL
Ron
I want to start by saying I am new to this, so please bare with me.
I am trying to put together a Purchase Order database for my employer and while I have tinkered with Access, I know very little.
I am using a slightly modified version of the Inventory database that comes with 2002 - basically I've added 2 fields to the products table and products form. One is for our item number and the second is for our suppliers' item number.
What my employer would like is when entering a purchase order, to only have the products supplied by the supplier from whom the PO is for .... so what I have tried to do is code a unbound Combo Box sql in the main form with
SELECT Suppliers.SupplierName FROM Suppliers ORDER BY Suppliers.SupplierName;
Set the AfterUpdate to (among others)
Private Sub SupplierID_Combo_AfterUpdate()
Me![Purchase Orders Subform].ProductID.Requery
End Sub
Then in the subform (datasheet) set a unbound Combo Box
SELECT Products.*, Products.ProductID, Products.CongressItemNo, Products.SupplierItemNo, Products.ProductName, Products.UnitPrice, Products.Supplier FROM Products WHERE (((Products.Supplier)=Forms![Purchase Orders]!SupplierID_Combo));
This works somewhat ... expect ... I select a product and everything is filled in except a quantity box - which is correct .... but once I enter the quantity another record/item is added with the exact same product info... quantity blank .... if I select a second product the first chages to match the second ... if I select a third the first 2 change to match the third ... and so on...
Any thoughts help? PLEASE! Don't have much hair left!! LOL
Ron
Last edited: