Let me start by saying I'm really lost! I know I don't have the terminology down right so I'm just going to state what I want to do & hope that someone can lead me along in a simple way with a simple example. I have a few different questions. I’ve made some complex code work but I haven’t done anything globally outside of any given form. I think that’s where I’m getting lost.
Scenario:
The user opens FormOne and keys some data. A value is not found in a list for one of the fields. I have my own code to handle this condition that in turn asks if the user would like to add that value. If the user chooses to add that value then FormTwo will be opened. When they are done with FormTwo (on close) I’d like to store just one of the fields that was keyed on FormTwo to be passed back to be displayed on FormOne.
I have a few questions for this scenario.
1) I’ve seen written that I can make a public field to hold the value to be accessed within the application. My problem is how & where do I declare the public field.
2) Do I need to fully qualify the field to access it in FormOne. If so, what would the fully qualified text look like?
3) The code I have for handling the not found in list is something I’d like to use in more then one form. How can I take this code and put it in a public place to be accessed by more then one form? I need some specifics too, as in click on the module tab and create a new module named whatever or click on the Macro tab. I’d also need to pass a value into the code.
I guess I’m just not getting how to go global and what the code would be called. I see functions & modules but I don’t quite get the difference.
Any help would be appreciated!
Scenario:
The user opens FormOne and keys some data. A value is not found in a list for one of the fields. I have my own code to handle this condition that in turn asks if the user would like to add that value. If the user chooses to add that value then FormTwo will be opened. When they are done with FormTwo (on close) I’d like to store just one of the fields that was keyed on FormTwo to be passed back to be displayed on FormOne.
I have a few questions for this scenario.
1) I’ve seen written that I can make a public field to hold the value to be accessed within the application. My problem is how & where do I declare the public field.
2) Do I need to fully qualify the field to access it in FormOne. If so, what would the fully qualified text look like?
3) The code I have for handling the not found in list is something I’d like to use in more then one form. How can I take this code and put it in a public place to be accessed by more then one form? I need some specifics too, as in click on the module tab and create a new module named whatever or click on the Macro tab. I’d also need to pass a value into the code.
I guess I’m just not getting how to go global and what the code would be called. I see functions & modules but I don’t quite get the difference.
Any help would be appreciated!