I think this is a simple problem.
I have a field called “mailto” which, when it is updated, also updates data in another field “HomeE-mail”.
I need an “IF” clause which will say that if the field “Mailto” is null, then the field [HomeE-mail] is null.
Here is more info, in case you need it.
The field “Mailto” is a hyperlink field and currently has an after-update event which strips the words “mailto:” off the email address in the hyperlink field “Mailto” and put the resulting value in the text field “HomeE-mail”. It does this by means of some code which I earlier got from a posting on this list, I believe. Here is that current code which runs as an after-update event:
[HomeE-mail] = Mid$([MailTo], 9, Len([MailTo]) – 9)
That code works just fine. But sometimes I need to delete an email addresses that is in the Mailto field, so I need to add an “if” clause (something like If IsNull (mailto) Then…….) that will delete the info in the HomeE-mail field if I delete the info in the Mailto field. The current code (above) will be my Else clause.
I have tried a few things because I thought it would be simple, but all of them result in error messages.
Thanks in advance for any suggestions. I have had no problems with If Then when it is putting a value into something, but it seems to have me stumped when I want it to create an empty field!
-cynthia