Hi I am trying to make a form for Purchase Orders. I want to be able to select a vendor on the main form and have it only list the available products in the subform.
Example:
Main form = [Purchase Order]
Sub form = [Purchase Order Data]
Vendor control = cboVendor -- located on main form
Product control = cboProduct -- located on sub form
I have a query on cboProduct to show all products where vendor = cboVendor. As it sits it will work if I hit F9 after a change.
I have also tried setting a requery event in a macro tied to the afterUpdate of cboVendor
I have also tried me.Requery in VBA tied to cboVendor's afterUpdate
If anyone can point out where I went wrong it would me much appreciated
Thanks,
Edit: I have managed to make this work on a single form. I am just lost when involving a subform. I have tried searching but only find info about single forms or controlling the subform as a hole.
Example:
Main form = [Purchase Order]
Sub form = [Purchase Order Data]
Vendor control = cboVendor -- located on main form
Product control = cboProduct -- located on sub form
I have a query on cboProduct to show all products where vendor = cboVendor. As it sits it will work if I hit F9 after a change.
I have also tried setting a requery event in a macro tied to the afterUpdate of cboVendor
I have also tried me.Requery in VBA tied to cboVendor's afterUpdate
If anyone can point out where I went wrong it would me much appreciated
Thanks,
Edit: I have managed to make this work on a single form. I am just lost when involving a subform. I have tried searching but only find info about single forms or controlling the subform as a hole.
Last edited: