Ben Scanlan
New member
- Local time
- Today, 18:53
- Joined
- May 28, 2004
- Messages
- 6
Hi,
I am having trouble using the Query builder to enter a validation rule for a control on a form.
The Form is called [CAPs Initial] and the control is called [Report Ref].
I want the validation rule to lookup values in a separate table ( table name: [CAPs Report Reference], field name: [Report Ref] ) and check to see if the entry already exists. If not then I want the form to allow the entry.
This is what I have entered as the validation rule at the moment:
=DLookUp("Report Ref","CAPs Report Reference","Report Ref = Forms!CAPs Initial!Report Ref") Is Null
I get a message saying there is a syntax error. I'm not bothered about whether this is coded this way or in VBA. I just would like it to work!
Hope someone can help me please.
Thanks
I am having trouble using the Query builder to enter a validation rule for a control on a form.
The Form is called [CAPs Initial] and the control is called [Report Ref].
I want the validation rule to lookup values in a separate table ( table name: [CAPs Report Reference], field name: [Report Ref] ) and check to see if the entry already exists. If not then I want the form to allow the entry.
This is what I have entered as the validation rule at the moment:
=DLookUp("Report Ref","CAPs Report Reference","Report Ref = Forms!CAPs Initial!Report Ref") Is Null
I get a message saying there is a syntax error. I'm not bothered about whether this is coded this way or in VBA. I just would like it to work!
Hope someone can help me please.
Thanks