Subform macro problems

G

Guest

Hi,

I have entered the following macro into a subform ("frmclinic") but am
experiencing problems.

Private Sub ContactType_Change()
If Forms!frmclinic.ContactType = "Telephone" Then
Forms!frmclinic.Location = "N/A"
Else
End If
End Sub

The macro runs perfectly when entering data in "frmclinic", duly inserting
"N/A" when "Telephone" is selected in the ContactType field. However,
frmclinic is a subform and will not be used for data inputting. The form that
will be used is called "frmpatient".

When I insert text into the ContactType field on the "frmpatient" form it
does not work and returns the following message: Run-time error '2450'. The
database cannot find the form "frmclinic" referred to.

I would really appreciate any help in resolving this.

Thanks
 

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