Welcome to Egypt Forums Mark forums read | Egypt Main Page
Egypt Forums
Arabic Movies



Software and Programs A place where you can share links to Windows applications , Adobe , Microsoft , Rapidshare , Megaupload..

Software and Programs Thread, Word - Multiple Required Fields in Software & Hardware , Games; Based on this formula, how would I change it to validate 2 or more fields simultaneously? More specifically, [If "this ...

Short Link: http://forum.egypt.com/enforum/showthread.php?t=21857


Reply
LinkBack Thread Tools Display Modes
Word - Multiple Required Fields
 
 
Senior Member

Reply With Quote
 
Join Date: Dec 2008
Posts: 18,122
27-01-2009, 01:50 AM
 
Based on this formula, how would I change it to validate 2 or more fields simultaneously? More specifically, [If "this field" equals "yes" and the "next field" equals "", then MsgBox...] *Correct for verifying "This field" only:* If...

Based on this formula, how would I change it to validate 2 or more fields simultaneously? More specifically, [If "this field" equals "yes" and the "next field" equals "", then MsgBox...]

Correct for verifying "This field" only:

If Trim(fld.Result) = "" Then
MsgBox "You must complete " & fld.Range.Bookmarks(1).Name & " before you can print.", vbOKOnly + vbExclamation, "Error"
Cancel = True
fld.Select
Exit Sub
End If

My attempt at verifying the "next field":

If Trim(fld.Result) = "Yes" And fld.Next = "" Then
MsgBox "You selected 'Yes' for " & fld.Range.Bookmarks(1).Name & ". Please answer Question 'b' after " & fld.Range.Bookmarks(1).Name & " before printing.", vbOKOnly + vbExclamation, "Error"
Cancel = True
fld.Select
Exit Sub
End If
 
 
 
Reply

Software and Programs Thread, Word - Multiple Required Fields in Software & Hardware , Games; Based on this formula, how would I change it to validate 2 or more fields simultaneously? More specifically, [If "this ...

Short Link: http://forum.egypt.com/enforum/showthread.php?t=21857


Bookmarks

Tags
fields, multiple, required, word


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump