I have a macro that opens a form but i would also what the macro to hide a control on the form when opened, i think this is possible but i can't remember how to set the value of a control to not visible using a macro.
The "No" in the Expression box does that and Yes makes visible
"False" as Bob says is code but False will work in SetValue macro action, at least in A2003.
In a macro the .Visble will automatically turn into .[Visible]
Code looks like
Forms!FormName!ControlOrLabelName.Visible = False
Is it possible that you have another macro or piece of code that runs (like OnCurrent) that makes the control visble or perhaps you referred to the wrong control in the macro.
If a control is to have its Visible property changed then the default position will depend on the form's use for that person.
But at this stage that is irrelevant because AnnPhil is not not able to make the control invisble and one would assume the same problem would prevent her from making it visible.
Yes - the default position clearly is for it to be invisible here - because the OP wants it to disappear when the form is loaded.
But at this stage that is irrelevant because AnnPhil is not not able to make the control invisble and one would assume the same problem would prevent her from making it visible.
Could it perhaps just be a typo in the reference to the object somewhere? - that should normally raise an error, but it's not uncommon for errors/warnings to be turned off inside a macro...)
Could it perhaps just be a typo in the reference to the object somewhere? - that should normally raise an error, but it's not uncommon for errors/warnings to be turned off inside a macro...)
OK it was a typo, sorry. Thanks so much for all your help, the form works great now. I use the form in two different instances and wanted to hide a few controls in one but not the other so now it works on both! I usually write this in code but for reason i wont go into i needed to put it in an existing macro and just didn't remember how to do it.,