Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9173213
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T16:32:13+00:00 2026-06-17T16:32:13+00:00

I have a customer file in MS ACCESS, it contains many tables. Case: In

  • 0

I have a customer file in MS ACCESS, it contains many tables.

Case:

In table(X) for Column(Y) there is validation rule of “=1 Or 2”. I want to change it to “=1 OR 2 OR 3 OR 4” if Possible, Its an Byte column. Otherwsie i want to completly remove the validation rule for that column. I am using C# and i need a query to do so…….

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T16:32:15+00:00Added an answer on June 17, 2026 at 4:32 pm

    Access SQL can not be used to add, remove, or alter a Validation Rule. That can only be done through the DAO TableDef.

    If you were using VBA in Access, you could do this to create your Validation Rule.

    CurrentDb.TableDefs("X").Fields("Y").ValidationRule = "IN (1,2,3,4)"
    

    I used IN (1,2,3,4) instead of 1 OR 2 OR 3 OR 4, but either should work.

    Perhaps you can use Microsoft.Office.Interop.Access to do the same from c#.

    An alternative would be to create a check constraint with Access SQL. A check constraint is not the same as a Validation Rule, but could be used to accomplish the same goal.

    ALTER TABLE X ADD CONSTRAINT one_to_four CHECK (Y IN (1,2,3,4));
    

    You would still need to discard the existing Validation Rule. If that’s not feasible, you could create a new table with the same structure as the old, add the check constraint, and finally load data from the old to the new table.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have root access and want to change the identity of phone in order
I have an xml file like this: <result> <customer> <id>1</id> <name>A</name> </customer> <customer> <id>2</id>
I have an customer invoice table in my MySQL database with a DECIMAL(10,2) field
I have a customer table where I'm currently storing: Last Name First Name Middle
I have a Customer class that contains a property, MyProperty, which is of a
I have a customer using the Access 97 runtime to support part of their
I have a sample file from a customer and need to match the schema
I have a MS Access 2010 application with an item table that stores the
I have a database with this table: Customer - ID - Phone - Cell
I need to access plugins directory in my customer javascript file. I know we

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.