Db-why-not
Registered User.
- Local time
- Today, 12:06
- Joined
- Sep 17, 2019
- Messages
- 160
Hello,
Is there a easy way to set all the controls of a form to Null values on exit/ on close of form if form_completed checkbox is not checked. Can you do it without referencing every single control on a form? I always seem to mess up the syntax for form references with controls when I have the code run on subforms.
Does anyone know of a good tutorial on syntax for referring to controls from subforms and main forms? Thanks.
What I'm trying to do is I have a data entry form with option group buttons and a text box. I want user to select form completed checkbox when they have completed the form. When they click on form completed checkbox vba will check all controls for null values, if any null values found it will leave form_completed unchecked. If the user exits the form before checking the form completed box then it will reset all values on the form to null. If form completed is checked then the form will save and leave values as is and exit.
Is there a easy way to set all the controls of a form to Null values on exit/ on close of form if form_completed checkbox is not checked. Can you do it without referencing every single control on a form? I always seem to mess up the syntax for form references with controls when I have the code run on subforms.
Does anyone know of a good tutorial on syntax for referring to controls from subforms and main forms? Thanks.
What I'm trying to do is I have a data entry form with option group buttons and a text box. I want user to select form completed checkbox when they have completed the form. When they click on form completed checkbox vba will check all controls for null values, if any null values found it will leave form_completed unchecked. If the user exits the form before checking the form completed box then it will reset all values on the form to null. If form completed is checked then the form will save and leave values as is and exit.