Hi all,
I´m struggling with getting the right VBA code for a form I have in my DB.
I have a form with over 40 fields on it. Depending on the number in one text field (called días) I need to show or hide a lot of other fields.
For instance, if the number in "Días" is 4, 33 fields need to be hidden. If the number is 8, about 25 fields need to be hidden.
I have no problem with a simple IF statement to make sure that one condition is met but as soon as I add another condition, it seems to get stuck (no errors... my form just don´t want to load any of the previous hidden fields).
I know there should be a way to do it, but as being new to VBA I can´t seem to figure out how to rightly use it so that it actually does what I want.
I know that the whole statements need to be on Form_OnCurrent and in the control source for the field that I´m using but still...
Anyone who can get me in the rigt direction?
I´m struggling with getting the right VBA code for a form I have in my DB.
I have a form with over 40 fields on it. Depending on the number in one text field (called días) I need to show or hide a lot of other fields.
For instance, if the number in "Días" is 4, 33 fields need to be hidden. If the number is 8, about 25 fields need to be hidden.
I have no problem with a simple IF statement to make sure that one condition is met but as soon as I add another condition, it seems to get stuck (no errors... my form just don´t want to load any of the previous hidden fields).
I know there should be a way to do it, but as being new to VBA I can´t seem to figure out how to rightly use it so that it actually does what I want.
I know that the whole statements need to be on Form_OnCurrent and in the control source for the field that I´m using but still...
Anyone who can get me in the rigt direction?