For the easy of discussion I have simplified my code to simplier example.
I have a form named (frmCustomerActivity) with a command button named (cmdShowAllInvoices) which opens a second form named (frmShowAllCustomerInvoices). This second form is set a Pop Up with border style set to dialog. The user selects a customer invoice from a list box on this second form (frmShowAllCustomerInvoices) and I want to move the first form to the selected invoice(record).
I am able to write the selected record number back to the first form, into a text box who’s After Update event call code that will move the user to that record. The code triggered by this event works as desired when the user changes this text boxes value while still on the first form. However, I have just learned the painful news from the VBA/Access help file that this event, and other similar events, do not get triggered when the text box's data is changed via VBA code.
Help. I am stuck.
As a work around attempt I tried putting a transparent cmdButtom on the first form (frmCustomerActivity) and then tried to trigger its On Click event by setting focus on this transparent button from the second form and then using a SendKeys code to send an “{ENTER}” to ‘click’ this button, but the “{ENTER}” ends up being sent to the second form (frmShowAllCustomerInvoices), the place it originated from, and not being received on the desired first form.
I am open to any good strategy to meet this goal. I cannot add any more subform to the first form since screen space is very full already.
I have a form named (frmCustomerActivity) with a command button named (cmdShowAllInvoices) which opens a second form named (frmShowAllCustomerInvoices). This second form is set a Pop Up with border style set to dialog. The user selects a customer invoice from a list box on this second form (frmShowAllCustomerInvoices) and I want to move the first form to the selected invoice(record).
I am able to write the selected record number back to the first form, into a text box who’s After Update event call code that will move the user to that record. The code triggered by this event works as desired when the user changes this text boxes value while still on the first form. However, I have just learned the painful news from the VBA/Access help file that this event, and other similar events, do not get triggered when the text box's data is changed via VBA code.
Help. I am stuck.
As a work around attempt I tried putting a transparent cmdButtom on the first form (frmCustomerActivity) and then tried to trigger its On Click event by setting focus on this transparent button from the second form and then using a SendKeys code to send an “{ENTER}” to ‘click’ this button, but the “{ENTER}” ends up being sent to the second form (frmShowAllCustomerInvoices), the place it originated from, and not being received on the desired first form.
I am open to any good strategy to meet this goal. I cannot add any more subform to the first form since screen space is very full already.