473,385 Members | 2,029 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Validating Valid Combinations from Word Dropdowns

1
I am new to VB and struggling with the following Word form problem:

I am designing a Word form whereby the collective values from 10 different dropdowns must be tested to ensure that any 2 combinations is valid against a set of established rules.

For example; there are 10 dropdowns called Responsibility1, Responsibility2... Responsibility10. Each dropdown has VB code to generate a list a series of responsibilities based on a selection made in the Org_Type field (using the Select Case Statement).

Some combinations from Responsibility1...10 are not allowed. I have a word table with 2 columns, 1 listing each responsibility and a second column identifying its related conflict. If any combination from Responsibility1...10 matches the conflict table then an input box should will appear stating the conflict - looping until the user corrects a selection not in conflict.

Here is an example of the conflict table;

Responsibility NotAllowedWith
Internet Procurement PO Requisition Approver
GL Journal Entry Budget Approver
GL Journal Entry Budget Entry
GL Journal Entry PO Requisition Approver
AP Approver AP Invoice Entry


Currently I am using the IF statement to evaluate conflicts but it seems like a very cumbersome approach. E.g.

Expand|Select|Wrap|Line Numbers
  1. Sub ValidateResponsibilities()
  2.  
  3. If ActiveDocument.FormFields("Responsibility1").Result = "PO Requisition Approver" And ActiveDocument.FormFields("Responsibility2").Result = "Internet Procurement" Then
  4.         Do
  5.             sInFld = InputBox("PO Requisition Approver and Internet Procurement are responsibility conflicts! Choose another responsibility.")
  6.         Loop While sInFld = "Internet Procurement"
  7.         ActiveDocument.FormFields("Responsibility2").Result = "                    "
  8.        End If
  9.  
Is there a better approach to validating a series of results against multiple rules?

Any help is greatly appreciated.

GOgier
Sep 25 '07 #1
0 913

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: The Plankmeister | last post by:
Hi... What's the best method of validating input characters? I would like to prevent users submitting exotic characters (such as those acquired on Windows Systems by pressing ALT+) and thought...
4
by: Gleep | last post by:
Hi PHP coders, I've got an issue I'm stuck with. Imagine there is a large form that has 5 columns and 20 rows. In each row there is a check box - then 4 input fields. I already have the code...
1
by: davisjoseph | last post by:
Hi All, I'm using Xerces C++ 2.50 DOM version for Validating a valid XML againt the Schema(XSD) available; But it always shows an error in XSD I suppose; This is the error I'm getting using...
3
by: Mark | last post by:
Hi, Im trying to validate a form, all the validating works apart from one field. This particular field must consist of the first 2 characters as letters, & the following 5 as numbers. And if it...
36
by: rbt | last post by:
Say I have a list that has 3 letters in it: I want to print all the possible 4 digit combinations of those 3 letters: 4^3 = 64 aaaa
2
by: Applepieandpeas | last post by:
Hi, I am doing a course in web-design, and while trying things out (making a page), found that it is not valid. The message I got back said that it cannot recognise it because it must be text/html....
4
by: easoftware | last post by:
I am using VS .Net 2003 and VB. I have an app with one parent and two Mdi child forms. I need to validate data in the Mdi form. The Form.Validating event works when I try to close a Mdi form,...
3
by: TheSteph | last post by:
Hi Experts ! I have a Winform Program in C# / .NET 2.0 I would like to ensure that a value in a TextBox is a valid Int32 when user get out of it (TextBox loose focus)
232
by: robert maas, see http://tinyurl.com/uh3t | last post by:
I'm working on examples of programming in several languages, all (except PHP) running under CGI so that I can show both the source files and the actually running of the examples online. The first...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.