Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / July 2005

Tip: Looking for answers? Try searching our database.

Prevent sending email if data on form incorrect

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
John K. - 25 Jul 2005 23:46 GMT
I have a data entry form with a submit menu item.  When the user has filled
in the data entry form, they click submit on the menu and the record is saved
in the database and an email is sent to the user.

But, when there is an error (data validation error) on any of the fields of
the form, the User gets an error pop up stating that the data is not valid
for this field, but if they ignore the error and click submit, it will send
the email anyway, but not save the record in the table.

My users are confused because they get the email, but can’t find the record
in the database.

How can I prevent the email from being sent if any of the fields on the form
has data validation errors?

John K.
MacDermott - 26 Jul 2005 00:57 GMT
One approach would be to put "If Me.Dirty=true then Exit Sub" at the head of
your button-click code.  This will keep the message from being sent if
there's unsaved (unvalidated) data in the form.
   Of course you could make it fancier by giving the user a msgbox instead
of just exiting.

> I have a data entry form with a submit menu item.  When the user has filled
> in the data entry form, they click submit on the menu and the record is saved
[quoted text clipped - 6 lines]
>
> My users are confused because they get the email, but can't find the
record
> in the database.
>
> How can I prevent the email from being sent if any of the fields on the form
> has data validation errors?
>
> John K.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.