R
richardwo
Morning,
With the help of people on this forum I've written the following macro:
Private Sub ContactType_UponChange()
If Forms!frmclinic.ContactType = "Telephone" Then
Forms!frmclinic.Location = "N/A"
Else
End If
End Sub
which is designed to change the location field in a form to "N/A" when
ContactType of "Telephone" is selected.
I would like this macro to start each time "Telephone" is selected in the
ContactType field. I went into the design view of the relevant form
("frmclinic"), selected ContactType and then its properties, went to the
Event tab and then OnChange. I seleceted Macro Builder and in RunMacro in the
Action Builder cell. I typed in the name of the Macro
("ContactType_UponChange") and exited.
When I enter the form and select "Telephone" in the ContactType field it
brings up an error message stating that "A macro can call itself a maximum of
20-times ....". I have tried entering a repeat count of 1 but this does not
work. I would appreciate any help in sorting this.
Is this is the easiest way to run a macro dependent upon the outcome of a
combo box selection?
Thank you in advance.
Cheers
With the help of people on this forum I've written the following macro:
Private Sub ContactType_UponChange()
If Forms!frmclinic.ContactType = "Telephone" Then
Forms!frmclinic.Location = "N/A"
Else
End If
End Sub
which is designed to change the location field in a form to "N/A" when
ContactType of "Telephone" is selected.
I would like this macro to start each time "Telephone" is selected in the
ContactType field. I went into the design view of the relevant form
("frmclinic"), selected ContactType and then its properties, went to the
Event tab and then OnChange. I seleceted Macro Builder and in RunMacro in the
Action Builder cell. I typed in the name of the Macro
("ContactType_UponChange") and exited.
When I enter the form and select "Telephone" in the ContactType field it
brings up an error message stating that "A macro can call itself a maximum of
20-times ....". I have tried entering a repeat count of 1 but this does not
work. I would appreciate any help in sorting this.
Is this is the easiest way to run a macro dependent upon the outcome of a
combo box selection?
Thank you in advance.
Cheers