T
tom
Thanks for the input. I do think I will need the VB
code. I would rather it kick in before they have to save
the record. I am not clear of what to put though for the
event procedure.
Please help somemore.
Thanks,
Tom
code. I would rather it kick in before they have to save
the record. I am not clear of what to put though for the
event procedure.
Please help somemore.
Thanks,
Tom
-----Original Message-----
You may be able to set this up as a record validation rule in the table. To
access this, open the table in design mode then open the Properties sheet.
Under Validation Rule type something like
IIf(Not IsNull([Field1]),IsNull([Field2]),IIf(Not
IsNull([Field2]),IsNull([Field1])))
Under Validation Text, put a meaningful message so the user will understand
what is happening if they violate this rule.
The better way to handle this though, would be using VBA. In the form's
Current event and the AfterUpdate event of each of the 2 controls, lock or
unlock the other control depending on whether or not this control contains a
value. Using VBA will make this much more user friendly. The Validation Rule
won't kick in until they try to save the record.
--
Wayne Morgan
Microsoft Access MVP
I need a form to not allow an entry in a certain field if
there is a value of any sort in another given field for
the same record. For example you can not enter hours &
weight for the same record - only one or the other. Do I
need to set up VB or can I just do it in properties.
HELP
Thanks