Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 05-05-2016, 01:56 PM
derajlance derajlance is offline Disable email function of command button if all form fields are not completed Windows 10 Disable email function of command button if all form fields are not completed Office 2013
Novice
Disable email function of command button if all form fields are not completed
 
Join Date: May 2016
Posts: 18
derajlance is on a distinguished road
Default Disable email function of command button if all form fields are not completed

Now that I have my forms completed and emails sending the way I need them to send, I want to tweak a few things.

Is there any way to disable the email function of a command button if all form fields are not completed? If not, is there a way to prevent moving to the next field until the one before it is filled out?

I have figured out how to display an error upon exiting the form field with the following code:

Code:
Sub ExitText1()
    With ActiveDocument.FormFields("Text1")
        If Len(.Result) < 1 Then
            Application.OnTime When:=Now + TimeValue("00:00:001"), Name:="GoBacktoText1"
            MsgBox "This is a required field."
        End If
    End With
End Sub



But this does not prevent the user from submitting the form and sending the email.

Thanks in advance!
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Disable email function of command button if all form fields are not completed Email from Command Button derajlance Word VBA 6 05-05-2016 07:40 AM
Submit to Email Command Button rob7676 Word VBA 0 08-20-2015 05:05 AM
Disable email function of command button if all form fields are not completed command button that generates a popup for sending email oduntan Word VBA 4 03-21-2013 02:15 PM
Disable email function of command button if all form fields are not completed Command button - save in temp folder and send email with attachment bigbird69 Word VBA 13 11-18-2012 10:06 PM
Disable email function of command button if all form fields are not completed Word VBA: How to create a command button and trigger a function? tinfanide Word VBA 2 12-02-2011 05:51 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:40 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft