can anyone help?

  • Thread starter Thread starter Katrina
  • Start date Start date
K

Katrina

MS Access 97 has a bult in database called Inventory
Control which I use to create Purchase Orders. How can I
limtit the product selection dropdown on the Purchase
Order subform to only show the products relative to the
Supplier selected in the main form.

Many thank for any help!!!
 
As I haven't used that template/sample, I can't give you a detailed answer,
but in general, you'll replace the query for the Row Source Combo or List
Box control (what you called "product selection dropdown") with one that
includes criteria of the Supplier control on the main form. You'll do this
in code, probably in the OnCurrent event of the main form... or, perhaps,
your RowSource can always refer to the Supplier control. If that is the
case, then you may or may not have to Requety that control in the OnCurrent
(which you can do with either VBA code or a macro). The code to Requery is
simple:

Me.<insertYourControlsNameHere>.Requery

But, it may automatically be requeried when the record changes, so you may
not even have to do this step.

Larry Linson
Microsoft Access MVP
 
Many thanks Larry,

I'm quite new to Access having only used the standard
databases which you create when you start the programme
and select new -- that was where I found the "Inventory
Control" sample with the Purchase Order template.

It has 4 main tables --
Suppliers which is linked by SupplierID to Purchase Orders
Purchase Orders which is linked by Purchase OrderID to
Inventory transactions
Inventory tansactions which is linked by ProductID
to Products.
and Products.

The part I find difficult to get to grips with is how I
create a link between the Product and Supplier.

Regards
Katrina
 
Persevered with modifying the table structure and adding
code to dropdown box --- got it doing what I wanted ---
Many thanks for your help!!!!
 
Back
Top