[AccessD] Converting table data to Expression?
Ryan W
wrwehler at gmail.com
Tue May 18 14:53:34 CDT 2021
Does anyone know how to convert table data to an expression?
For example:
I want to make a table called TBL_ValidationRules
Columns:
Client
Field
Eval_for
so say Client A REQUIRES Field B to be NOT NULL.
So the data would be
Client: A
Field: B
EVAL_FOR: NULL
So with a button press on a form the code would loop through the recordset
for the current record/client in question and highlight or colorize Field B
if the field is null.
I can't use Table or Form validation rules for this because they change
from client to client and sometimes the end user doesn't even ENTER a field
for a validation rule to fire on it... so I was just thinking of I had a
way for my data entry people to click validate (or have it validate on
close/new record) and highlight the deficiencies that would be really cool.
So my question is how would I go about turning the text in the Eval_For
data into the expression eg:
if me(rst!Field) = rst!Eval_For then me(rst!Field).BackColor=#999999
where obviously rst!Eval_for is somehow turned into NULL (so expression
reads:
if me(rst!Field) = null then ..... .
Unless you fellas have a better idea?
More information about the AccessD
mailing list