INeedAccessHelp
MIS
Hi
This seems like a simple issue, but I just cannot get it to work. When clicking on a command button to open a form, I want to pass a value from one form, to populate a textbox on the newly opened form, BUT I want that value to be passed BEFORE the OnOpen procedures begin.
Example:
A command button on Form1 is used to open Form2. The data displayed when Form2 opens is dependent on what the passed value is. Well, the problem here is two-fold.
1. The OnOpen events are performed before the value is passed. Which is why I can't use this:
DoCmd.OpenForm "Form2
Forms![Form2]![txtbox] = Me![txtbox]
2. I cannot hard-code the form name that calls Form2 to open, because it is not always the same. Which is why I can't use this for the OnOpen event of Form2:
Forms![Form2]![textbox] = Forms![Form1]![txtbox]
then rest of code
...
...
...
I would appreciate any input. Thanks in advance.
This seems like a simple issue, but I just cannot get it to work. When clicking on a command button to open a form, I want to pass a value from one form, to populate a textbox on the newly opened form, BUT I want that value to be passed BEFORE the OnOpen procedures begin.
Example:
A command button on Form1 is used to open Form2. The data displayed when Form2 opens is dependent on what the passed value is. Well, the problem here is two-fold.
1. The OnOpen events are performed before the value is passed. Which is why I can't use this:
DoCmd.OpenForm "Form2
Forms![Form2]![txtbox] = Me![txtbox]
2. I cannot hard-code the form name that calls Form2 to open, because it is not always the same. Which is why I can't use this for the OnOpen event of Form2:
Forms![Form2]![textbox] = Forms![Form1]![txtbox]
then rest of code
...
...
...
I would appreciate any input. Thanks in advance.