473,698 Members | 2,051 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Validating Valid Combinations from Word Dropdowns

1 New Member
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 ... Responsibility1 0. Each dropdown has VB code to generate a list a series of responsibilitie s 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 928

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

Similar topics

5
2890
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 a way of doing this would be to compare the submitted strings with the array keys returned by get_html_translation_table(HTML_ENTITIES), but padding this array out with all the remaining normal keyboard characters. But... am I reinventing the...
4
2168
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 that inserts all the data BUT the validation is a nightmare. What I need is. If an entire row is empty (not checked or filled out) that's OK. However if a user fills in one or two input fields within a row - that's NOT ok. The entire row needs...
1
456
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 DOMError : Value 'The type of the operation for this entity.' is NOT a valid URI Value ' 1 = Allow 2 = Agree 4 = Deny' is NOT a valid URI; Here '1 = Allow 2 = Agree 4 = Deny' these are enumerated values in XSD.
3
14006
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 dosent meet these requirments an error message will be displayed. I have pasted the code (and highlighted the relevant parts) below in the hope that someone can help me out with this. Ive been trying to suss it out all week & it's driving me nuts!...
36
9465
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
1316
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. I have tried various different combinations, trying to make it work, and it won't. Is there anything else I can do? Thanks
4
2477
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, but not when I try to switch form one Mdi form to the other. I tried to add code to MdiForm1's Deactivate event: Private Sub MidForm1_Deactivate(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Deactivate Dim TempE As...
3
2793
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
13250
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 set of examples, after decoding the HTML FORM contents, merely verifies the text within a field to make sure it is a valid representation of an integer, without any junk thrown in, i.e. it must satisfy the regular expression: ^ *?+ *$ If the...
0
8671
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9152
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9016
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8856
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7709
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6515
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4360
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
2321
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
1997
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.