conditional Input mask

C

cd

If I have a field on a form that's comma-delimited is it
possible to build an input mask on another field that
would reflect the number of comma's in the first field.
For example if txtChemicals contains Ar,P txtRatio would
prompt for an equal number of inputs delimited by a colon,
example 70:30. I know this goes against normalization
rules but concatenating my data for inquiries and reports
is a huge resource hog on a similar database and I'm
looking for alternatives. If some one can assist me with
this, I really appreciate it.
 
M

Michel Walsh

Hi,


Input mask, even dynamically? I place myself as end user and I would
very unlikely like that. A validation rule, maybe:

( len(stuff)-len(Replace(stuff, ",", "" )) ) =
(len(param) - len(Replace(param, ",", "" )))

which check if the amount of coma is the same in stuff and in param (two
assumed strings). We computed the number of coma by replacing them with no
character and so, subtract the obtained length from the initial length of
the string. (ie, we "erased" the coma, and then, compare the length of the
modified string with the original one).


Hoping it may help,
Vanderghast, Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Input Mask is truncating 3
Input Mask Help 1
Input Mask or Validation? 24
input mask for phone number 2
Extending Input Mask 4
Quick and Easy Input Mask Fix? 0
Input Mask 1
Input mask works not reliable 1

Top