Change ValidationRule Property with VBA Code?

A

Air DeCHOso

Problem:
I can't seem to find the way to change the ValidationRule Property with VBA
Code.

Situation:
On my form, I have created 6 checkboxes in the Form Header. Upon checking a
box, several fields in the Form Detail are either disabled or enabled.

I need HELP to figure out how to change the ValidationRule Property for
several fields upon checking of a box in the Form Header. Each checkbox may
have a different set of ValidationRules for several fields.

Solution:?????
 
T

Tim Ferguson

I need HELP to figure out how to change the ValidationRule Property
for several fields upon checking of a box in the Form Header. Each
checkbox may have a different set of ValidationRules for several
fields.

I think you need to keep the VRs for the GUI and for the table columns
separate. You really don't want to change the VRs on a table that already
has data in it -- if they break then you'll get some very nasty errors.

The ValidationRule property of the text box on the form is easy to get at,
though:

me!txtFutureDate.ValidationRule = ">Date()"

I must say that I have never found cause to do this. Do you have a Design
Problem?

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