okay, i know this sounds a bit whacky, but i am working around someone else's
code, and have a very quick deadline.
what i need to know, is there a way to open a form and run the code that it
has behind a command button, from another form?
i have a main form, that shows a basic view. some buttons on this form need
to open the much more detailed form, and excute code within that form as if
one of those buttons were clicked. in other words, open form, run
commandbutton_click() code.
thanks in advance for any assistance!!
Bob L. - 14 Mar 2007 19:03 GMT
> okay, i know this sounds a bit whacky, but i am working around someone else's
> code, and have a very quick deadline.
[quoted text clipped - 8 lines]
>
> thanks in advance for any assistance!!
I was able to open a form called frmEmployees and push a command button
(cmdNext) on that form successfully using the following code:
DoCmd.OpenForm "frmEmployees"
Forms("frmEmployees").Controls("cmdNext").SetFocus
SendKeys "{ENTER}", True
HTH,
Bob L.
alfaista - 14 Mar 2007 19:16 GMT
thank you thank you!!
forgot all about sendkeys!! works perfect, and fast! thanks!
> > okay, i know this sounds a bit whacky, but i am working around someone else's
> > code, and have a very quick deadline.
[quoted text clipped - 18 lines]
> HTH,
> Bob L.