Validation rule

G

gr

Hi, i have a table with two date fields [Von] and [Bis],
where [Bis] must be bigger than [Von]

In the validation rule i'm typing
= [Von] Or Is Null

I'm using the Is Null to allow the user let the field in
blank.

But when trying to save the following message is displayed:
"Invalid SQL Syntax: cannot use multiple columns ina a
column level CHEC constraint"

I even don't understand what this means!!! Obviously the
validation rule is discarded..
Any ideas?
thx,
gr
 
T

Tim Ferguson

But when trying to save the following message is displayed:
"Invalid SQL Syntax: cannot use multiple columns ina a
column level CHEC constraint"

It means that field-level validation rules cannot refer to other fields.
You can do this by adding it to the table level validation rules. Right-
click the table in Design View and select Properties, and there is an entry
for Validation Rule. You'll need to write out the expression in full:

([Bis] Is Null) OR ([Von] <= [Bis])

Hope that helps


Tim F
 

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

Top