-
1
- #1
Hi,
Not sure what the best approach to this would be. I have a button which opens a form in dialog mode, which I want to pass three integers to, to use to set up the contents of some combos etc. But because its in dialog mode, the code after DoCmd.OpenForm .. doesn't run til its closed. And because I open it from several places the variable values don't always come from the same place, so I can't easily do something in the onLoad event to get the values.
Options I have thought of are:
1. Pass all the integers as a comma delimited string to the openargs property, and then parse this when the form opens to get the integers.
2. Set up some cases for where the integers come from, pass a single flag to the openargs and then depending on the case use the onLoad event to get the integer values from specific places on already open forms.
Neither of these seem very neat! - am I missing something/does anyone know a nicer way to do this?
Thanks!
Not sure what the best approach to this would be. I have a button which opens a form in dialog mode, which I want to pass three integers to, to use to set up the contents of some combos etc. But because its in dialog mode, the code after DoCmd.OpenForm .. doesn't run til its closed. And because I open it from several places the variable values don't always come from the same place, so I can't easily do something in the onLoad event to get the values.
Options I have thought of are:
1. Pass all the integers as a comma delimited string to the openargs property, and then parse this when the form opens to get the integers.
2. Set up some cases for where the integers come from, pass a single flag to the openargs and then depending on the case use the onLoad event to get the integer values from specific places on already open forms.
Neither of these seem very neat! - am I missing something/does anyone know a nicer way to do this?
Thanks!