Error when calling the On Load event of my subform

H

HeislerKurt

I'm trying to call the Form_Load event of my subform (frmReferrals)
from the On Current event of my main form (frmPatients). I have this
working in another database but can't figure out the problem in this
new one.

The OnCurrent code for frmPatients is:

###

If IsNull(Me.PatientID) Then
Me.frmReferrals.SetFocus
Me!frmReferrals.Form!txtVisit1.Visible = False
... etc.
Else
Me.frmReferrals.SetFocus
Me.frmReferrals.Form.Form_Load ' <<<< this is the problem line
End If

###

When it evaluates to Else, I get this error:

Run-time error 2465: Application-defined or object-defined error

Debugging points to the second line:

Me.frmReferrals.Form.Form_Load line

###

Any ideas?

Kurt
 

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

Top