conditional Input mask

  • Thread starter Thread starter cd
  • Start date Start date
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.
 
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
 
Back
Top