Validation Issues

clive2002

Registered User.
Local time
Today, 20:56
Joined
Apr 21, 2002
Messages
90
I have a form running from a table with the below fields.

Journey__ Required ___StartLocation___EndLocation
1________Yes ________London_______Manchester
2________Yes ________Manchester____LiverPool
3 ________No________ Please Select___Please Select
4________ No________ Please Select___Please Select

The users are limited to entering upto four Journeys as the form doesn't allow additions and the table only contains the four rows of data. The start and end locations are selected from dropdowns.

I need to enforce the following.

1) The 'StartLocation' must be the 'EndLocation' of the prevoius entry, unless its 'Journey' =1.

2) Both locations must be specified if the 'Required' field has been switched to "Yes"

3) If the 'Required Field has been switch to "No" then the Locations should revert to "Please Select".

4) Journey fields used should be used sequential, eg the User can't use Journey 1 and 3 without using 2, or just use 4 without using 1-3.

Any help is much appreciated as usual.
 
Why do you need to put any of this info in your table? You certainly don't need the "required " field and I guess that you don't need to store the other info either. Of course, I may be wrong.

This could probably be achieved with an unbound form and controls, with some code to satisfy the constraints you want to apply. Can you tell us a little more about what you're doing with this form?
 
The Purpose of the form is to allow the user to run a query on the information entered.

The details entered are processed to return the distance and time to travel between each location, giving a breakdown of each leg of the journey and an overall total. The overall journey can only contain the four stages.


I'll breakdown the purpose of each validation.

1) The stages need to carry over to form the total journey.
2&3&4) i don't want to pass empty fields to the subroutines and this seems the most user friendly way to achieve this. The required flag triggers the further processing of the field by my code.

My overwhelming concern is that the users of this application are as thick as pig s&*t and these validation rules really are required.
 
Yes , I understand the need for validation, but I don't think you need to store this information. I'm not suggesting that you do away with any of your fields, just that you don't bind the information to a table. You can work on what the user puts into the fields freely, but once processed , it can be junked.

Let me come up with some ideas to implement these requirements for you tomorrow morning. It's getting late now!
 
The form on the attached database is what I mean. It needs refining so you can edit it, but it does what I think you want , basically. Or have I got the wrong end of the sticK?
 

Attachments

Users who are viewing this thread

Back
Top Bottom