OK, first of all I dont want my users clicking here, there and everywhere so ive set all my forms (except subforms) to modal. They have to deal with each form and close before doing something else. Also I prefer the tidier look that pop-ups give, so all are actually popup modals.
frmOrders = Main Order form details with order number, customer ID and date etc
frmSubOrder = subform within frmOrders, continuous record style, where each individual product, qty and price is added.
frmProdSearch = Opened from a control on frmOrders, users can easily find and select the product they want through comprehensive search functions
What Im after is when the user selects the product they want in frmSearchProd, VBA will close that form, and of course focus automatically returns to frmOrders.
The product code selected in frmSearchProd is set as Public variable so takes what they want from Search to the Order.
I then want an automatic event to fire in frmOrders when focus is returned/activate etc.
(with the eventual view to create a new record in the subform and update txtProductID control with the Public variable as determined in frmProdSearch.. but one thing at a time)
So simply, is there a way for frmOrders to say "yes, I have got control back, thank you!"
I have found out that due to being popup, any code within events for GotFocus and Activate is simply ignored.
Ive already tried to specifically set focus to frmOrders from frmSearchProd with both the click event of the product the customer wants and the Close event of the form itself - no luck :banghead:
Where am I going wrong, or even, do I want the impossible?
Fingers cross folks
frmOrders = Main Order form details with order number, customer ID and date etc
frmSubOrder = subform within frmOrders, continuous record style, where each individual product, qty and price is added.
frmProdSearch = Opened from a control on frmOrders, users can easily find and select the product they want through comprehensive search functions
What Im after is when the user selects the product they want in frmSearchProd, VBA will close that form, and of course focus automatically returns to frmOrders.
The product code selected in frmSearchProd is set as Public variable so takes what they want from Search to the Order.
I then want an automatic event to fire in frmOrders when focus is returned/activate etc.
(with the eventual view to create a new record in the subform and update txtProductID control with the Public variable as determined in frmProdSearch.. but one thing at a time)
So simply, is there a way for frmOrders to say "yes, I have got control back, thank you!"
I have found out that due to being popup, any code within events for GotFocus and Activate is simply ignored.
Ive already tried to specifically set focus to frmOrders from frmSearchProd with both the click event of the product the customer wants and the Close event of the form itself - no luck :banghead:
Where am I going wrong, or even, do I want the impossible?
Fingers cross folks