Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2010
    Posts
    2

    Unanswered: Validation Rule Refering to Another Table

    I am using Access 2007, trying to migrate an existing database into Access and want to set a Validation Rule for one of the fields using the values from a column in another tables. In the Design View for "thisTable" I've written a Validation Rule for one field like this:

    IN (SELECT otherTable.[fieldName] FROM otherTable)

    but, I get an error: "Object invalid or no longer set." The MS suggested help for this seems irrelevant.

    Why doesn't this work? Any help would be much appreciated.

  2. #2
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    To the best of my knowledge, you can't do that. The "typical" method of doing what you describe is probably setting referential integrity in your relationships.
    Paul

  3. #3
    Join Date
    Apr 2010
    Posts
    2

    Thanks

    You put me in the right direction. I did some testing and choosing to enforce "Referential Integrity" without any cascade options accomplishes what I wanted to do.

    Thanks, Paul.

  4. #4
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    No problemo, and welcome to the site by the way!
    Paul

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •