call a sub from 2 different sunforms
Ok this is a first for me so mind my dumbness
youknow how in the VB editor, you have on the left hand side all your forms. You click on on and you see all the subroutines for that one form.
How do you call a subroutine from two different forms.
The reason im doing this is because im trying to requery a list on a subform on a tabed main form.
the list will not requery no mattter what I do. The only way is to hit the ok button on the subform of the list I want to requery.
I havent found a solution so I figured if I called that subroutine where the button is that it would work the same way. As me pushing the button myself.
This is all happening on the ON_CLICK function of the tab on the main form.
Am I wrong?
Ppl have tried to help with no success they gae me the following code.
Forms![mainform]!subform!list.requery or something to that effect.
It doesnt work.
thanks
Ok this is a first for me so mind my dumbness
youknow how in the VB editor, you have on the left hand side all your forms. You click on on and you see all the subroutines for that one form.
How do you call a subroutine from two different forms.
The reason im doing this is because im trying to requery a list on a subform on a tabed main form.
the list will not requery no mattter what I do. The only way is to hit the ok button on the subform of the list I want to requery.
I havent found a solution so I figured if I called that subroutine where the button is that it would work the same way. As me pushing the button myself.
This is all happening on the ON_CLICK function of the tab on the main form.
Am I wrong?
Ppl have tried to help with no success they gae me the following code.
Forms![mainform]!subform!list.requery or something to that effect.
It doesnt work.
thanks
Last edited: