DoCmd, or Filter for AutoFill??? (1 Viewer)

Stephanie T.

Registered User.
Local time
Yesterday, 23:00
Joined
Jun 20, 2002
Messages
60
I’m not sure if this is a DoCmd or what the best way to approach this is and I am very new to VBA…

My form is called frmSalesOrders (this is where our sales orders are entered). On this form is a field for entering our “bill to” customers (a combo box bound to the table tblWarehouses). I also have a “ship to” box because many of our customers have multiple “ship to” addresses.

What I would like to do is set it up so that when a customer is chosen from the “bill to” combo box, the only choices in the “ship to” field will be those for that customer. If the customer only has one "ship to" address that would autofill, if they have more than one "ship to" address, my data entry person can choose the correct warehouse (via combo box), but her choices will be limited to only those warehouses connected with that customer.

Somehow I know that I will need to write code that will refer to both the "customer" and the "warehouse" fields in the Warehouse form. But I don't know what code, is this a DoCmd? If so does this go on the After_Update for the "ship to" field? Does anyone have some simple code for this process?

Any help is appreciated.

Thank you,
Stephanie
 

Users who are viewing this thread

Top Bottom