A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Input masks for a field with varying data lengths/values



 
 
Thread Tools Display Modes
  #1  
Old November 22nd, 2004, 11:59 AM
AMHodgetts
external usenet poster
 
Posts: n/a
Default Input masks for a field with varying data lengths/values

Hi,

I have a database which logs tape movements between sites. I have a field
in a table called TapeID, I need to specify an input mask for this field so
that the value cannot be longer or shorter than a certain length.

My problem lies with the fact that the TapeID can be anything from 7 to 10
characters in length and each field can have a different tapeid (ie,
DTAWHWK03a or 030001). Ideally I would like to specify an input mask which
not only limits the field length, but also specifys that the prefix
characters must be a letters followed by numbers or vice versa).

Here are the prefix values required for the field;

BFG
ICEPERM
BFGWK
MD
01
03
RUNBDC02_
PRPRIM0
SDWEEK
SDRS
SDRS
SDRUG
SAVSYS
SDZEUS
ZEUSWK

Is there any way I can do this without having to create seperate tapes for
each TapeID.

Thanks
--
Ann Hodgetts
  #2  
Old November 22nd, 2004, 05:58 PM
Tim Ferguson
external usenet poster
 
Posts: n/a
Default

"=?Utf-8?B?QU1Ib2RnZXR0cw==?=" wrote
in :

Ideally I would like to specify an input mask which
not only limits the field length, but also specifys that the prefix
characters must be a letters followed by numbers or vice versa


Quite apart from the fact that I hate input masks almost as much as
syphilis, I think that this is too big a job for IMs.

I would use the BeforeUpdate event for the text box on the form to validate
properly, using a suitable combination of Len() functions and Like
operators, or the RegExp object, etc.

Hope that helps


Tim F

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Input Masks mk2 Database Design 1 October 31st, 2004 08:52 PM
Is this possible with Excel Chart? q582gmzhi Charts and Charting 1 September 8th, 2004 03:33 AM
How to total cells in a range with data input SylviBeOS Worksheet Functions 1 May 8th, 2004 05:23 PM


All times are GMT +1. The time now is 02:56 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.