#1
|
|||
|
|||
Need Help setting up application with mandatory fields to complete
Hi i am looking for some help
section 1 I have been giving the task to set up a application form that will have fields that must be completed depending on the Grade - once section one is completed it will allow them so save and send to line manager to complete section 2 is this possible if not possible - how do i get the fields must be completed before it allows to save file D |
#2
|
||||
|
||||
While that is possible, your form would need some revision since some of the options are mutually exclusive - logic dictates that one wouldn't check both Yes/No boxes for the «Are you eligible to work in the UK?» question, for example - better to use a dropdown with Yes/No choices there.
For example, if your document employs formfields, you could use an AutoClose macro like the following in the 'ThisDocument' code module of your document: Code:
Private Sub AutoClose() Dim FFld As FormField, Cancel As Boolean: Cancel = False With ActiveDocument For Each FFld In .FormFields With FFld Select Case .Type Case wdFieldFormTextInput: If Trim(.Result) = "" Then Cancel = True: Exit For Case wdFieldFormDropDown: If .Result = "Choose" Then Cancel = True: Exit For End Select End With Next If Cancel = True Then MsgBox "Please complete all the items" .Saved = False SendKeys "{ESC}" End If End With End Sub For PC macro installation & usage instructions, see: Installing Macros For Mac macro installation & usage instructions, see: Word:mac - Install a Macro
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Preparing a drop down with options to complete multiple fields | ajb | Word | 8 | 03-24-2018 12:56 AM |
VBA Mandatory/Required Fields - legacy and activex | jambo2016 | Word VBA | 1 | 05-20-2016 04:35 AM |
Mandatory password possible? | Cropfield | Word | 0 | 01-08-2016 06:37 AM |
How to show planned% complete and actual% complete on the (Project Overview) dashboard report? | zislam14 | Project | 3 | 12-17-2015 03:03 PM |
trouble setting excel to import correctly into mail merge. Not using typical address fields | ragoo | Mail Merge | 1 | 10-28-2014 03:42 PM |