form open event and screen.activeform

  • Thread starter Thread starter rmanchu
  • Start date Start date
R

rmanchu

hi

i've got a few forms which are backed by ado recordsets and i load them
on the forms OnOpen event via vb code in a common module.

to clean the form module code, i added the following line to the top of
the code and had it called via macro, instead of passing "me" to the
code.

if frm is nothing then set frm = screen.activeform

however, at the time of the OnOpen event, it seems that
screen.activeform <> to the form being opened!

so is there a way to get the form being opened, in vb code, when called
from the OnOpen event of that form?

thanx
riyaz
 
Pass Me.

You can't miss.

If you are trying to call a generic function without using the form's
module, use the form's Form property:
=MyFunction([Form])
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top