Advertisement

11.18.2004 at 02:50PM PST, ID: 21212496
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.4

Field valiadation  Where and how to set it up on a form.

Asked by locka in Microsoft Access Database

Tags: ,

I seem to be getting problems all over the place.  I just feel that I might be looking at this from the wrong angle. Here goes

I have a table with a subform set-up on it as a continuous form.  The user can then click either the add button from the main form or double click on a row in the subform.  This brings up a popup form.  With a list of items that can be selected.  Once selected, the items are added to the subform, and the popup form is then closed.  This works pretty well.  

Once the item appears in the first field of the row, all the other fields on that row need to be typed or selected, before the user can leave the record/Subform.  Can some one explain to me where the best place is, to stick my validation code?  So that it checks all required field null values plus a few other checks before they can leave the record or the subform?

I have had the following problems with my code:-

1) Allowing me to leave the form when the record is not complete
2) Trying to check for null values on newrecord row
3) Allowing you to press the esc which is ok but then allowing me to leave the form where before I could not

I am sure that I am just doing something stupid with my code.  Here is an example of the type of code I am using:-

'This checks the quantity field to make sure it not 0
If Me.Quantity = 0 Then
    MsgBox "To remove an item double click the item. Otherwise the quantity must be 1 or more.", vbOKOnly + vbInformation, "Error"
    Cancel = True
    Me.Quantity = 1
    Me.Quantity.SetFocus
end if

OR*******************

'This checks that serial number is present if requires serial number field is set true
ElseIf IsNull(Me.SerialNumber) = True And Me.RequiresSerialNumber = True Then
    MsgBox "You must enter the serial number for the item selected.", vbOKOnly + vbInformation, "Error"
    Cancel = True
    Me.SerialNumber.SetFocus
   
OR*******************

'This checks that location is not null
ElseIf IsNull(Me.Location) = True Then
    MsgBox "You must selected the location of this item.", vbOKOnly + vbInformation, "Error"
    Cancel = True
    Me.Location.SetFocus

Start Free Trial
[+][-]11.18.2004 at 03:21PM PST, ID: 12620351

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11.18.2004 at 03:31PM PST, ID: 12620433

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Microsoft Access Database
Tags: required, field
Sign Up Now!
Solution Provided By: rockmuncher
Participating Experts: 1
Solution Grade: B
 
 
[+][-]11.19.2004 at 09:12AM PST, ID: 12627416

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11.19.2004 at 01:27PM PST, ID: 12630158

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080924-EE-VQP-38