hello,
i've used the code found in the faq702-5307 for creating custom command buttons on access forms with great success. the problem i'm having with it now is that it doesn't work when the custom button is on the subform of the main form. when i click on the custom button, it comes up with an error:
"Microsoft Office Access can't find the form 'SubformName' referred to in a macro..."
when i debug, it takes me to the portion of the code that begins:
Forms(strForm).Controls(cmdButton & "_Hover").Visible = True
i think the problem is in the reference to the form (where strForm = SubformName), but i don't know how to rewrite the code so that all custom buttons work in my database, regardless of whether they're on the main or sub forms.
i'm hoping that since Beard36 was kind enough to share the code, it wouldn't be too hard for someone to modify it for my situation. yes, i'm a novice in coding...any help is appreciated!
thanks...
emil
i've used the code found in the faq702-5307 for creating custom command buttons on access forms with great success. the problem i'm having with it now is that it doesn't work when the custom button is on the subform of the main form. when i click on the custom button, it comes up with an error:
"Microsoft Office Access can't find the form 'SubformName' referred to in a macro..."
when i debug, it takes me to the portion of the code that begins:
Forms(strForm).Controls(cmdButton & "_Hover").Visible = True
i think the problem is in the reference to the form (where strForm = SubformName), but i don't know how to rewrite the code so that all custom buttons work in my database, regardless of whether they're on the main or sub forms.
i'm hoping that since Beard36 was kind enough to share the code, it wouldn't be too hard for someone to modify it for my situation. yes, i'm a novice in coding...any help is appreciated!
thanks...
emil