Calling another form's object event - error msg... object required

L

lp

i am trying to call another form's object event.. and i am receiving error
mesage "object required". Any ideas anyone? here is my statement:
Call frmMain.cmdApplyFilter_Click

I do have both subs, the one being called and the one that this statement is
in, both as public.

thanks in advance!
 
6

'69 Camaro

Hi.

Try:

Call Form_frmMain.cmdApplyFilter_Click

The sub being called needs to be public, but the procedure calling it
needn't be.

HTH.

Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.

(Please remove ZERO_SPAM from my reply E-mail address, so that a message
will be forwarded to me.)
 
D

Douglas J. Steele

Call Form_frmMain.cmdApplyFilter_Click

frmMain must be open for this to work.
 
Top