Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access 2000 Email runtime error

Status
Not open for further replies.
Apr 19, 2000
73
US

I have a form with a field on it of [emailaddress]. I created a command button that when clicked opens email and puts in the email address in the to line. Heres the code.

Docmd.SendObject acSendNoObject,,acFormatRTF,Me![EmailAddress],,,,,-1

The problem is when someone clicks the command button when the field is blank I get runtime error. What is want is a popup mesage of "Invalid or no Email address provided" to appear if the command button is pushed and the field is blank but am having a brain freeze up doing trying to figure it out.
How do i do this?
Thanks
 

I would open the form with your command button disabled. I would enable it from the after update event of the email address field. If a valid address has been entered, then enable your email command button, otherwise, ignore the entry.
Robert Berman
Data Base consultant
Vulcan Software Services
thornmastr@yahoo.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top