Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 14th, 2005, 11:31 AM
Authorized User
 
Join Date: Nov 2005
Location: , , .
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default Field Validation

I would like to validate input into a database to make sure it conforms. The format that I want is 'Y########' where the 'Y' will always be a 'Y' and the #'s can be any number; the length is also fixed to 9. I've tried finding how to do this all over and I'm sure it's something easy to do, so any help would be appreciated!

 
Old November 14th, 2005, 11:40 AM
Friend of Wrox
Points: 4,007, Level: 26
Points: 4,007, Level: 26 Points: 4,007, Level: 26 Points: 4,007, Level: 26
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Lansing, Michigan, USA.
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
Send a message via ICQ to SerranoG Send a message via AIM to SerranoG
Default

Have you tried putting an INPUT MASK into the field's properties in table design view?

Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division
 
Old November 14th, 2005, 11:41 AM
Friend of Wrox
 
Join Date: Jan 2005
Location: Kansas City, Missouri, USA.
Posts: 471
Thanks: 0
Thanked 1 Time in 1 Post
Default

Thurston,

Change the input mask to \Y99999999 on the field in the table. Make sure you have the same input mask on your input form. Set the field size to 9 and make it a text field.

Kevin

dartcoach
 
Old November 14th, 2005, 12:26 PM
Authorized User
 
Join Date: Nov 2005
Location: , , .
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks! I was trying to validate any input...this was much easier.

 
Old November 14th, 2005, 12:39 PM
Authorized User
 
Join Date: Nov 2005
Location: , , .
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Would there be any way to make sure that the letter is in caps, because I can enter it in lower case currently...I'm guessing this is where I would validate?

 
Old November 14th, 2005, 12:40 PM
Authorized User
 
Join Date: Nov 2005
Location: , , .
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Nevermind, it accepts it and then automatically capitallizes it.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Validation on a date field. OneQuestion ADO.NET 3 January 6th, 2008 01:30 AM
Field Array Validation in Javascript Asad Khan Apache Tomcat 1 September 4th, 2007 06:14 AM
Field Validation in an Editable Data Grid Shadane ASP.NET 1.0 and 1.1 Basics 3 October 2nd, 2006 09:02 AM
JavaScript form field validation error issue crmpicco Javascript How-To 4 July 4th, 2005 10:10 AM
Text Field Validation zaeem Pro VB Databases 1 May 27th, 2005 12:36 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.