Hi, got a table I want to add a check constraint to.Ogot a query [on the table] with the desired constraint in the where clause:SELECT LOG.WORK_ID, LOG.ACTIVITY_ID, LOG.SUBJECT, LOG.TIMEFROM LOGWHERE(((LOG.ACTIVITY_ID) Between 1 And 5)Or((LOG.ACTIVITY_ID) Between 6 And 7) And ((LOG.SUBJECT) In ('Other','IT')));perhaps not the best way to phrase the constraint [/where] but how may I add this as a check constraint to the LOG table?btwnew to this apols for anything not correct/missingthnx

Hi, welcome to UA.You can go to table design view and set the 'Validation rule' property of the field(s) that require(s) the check constraint. Alternatively you could code itLTER TABLE tablename ADD CONSTRAINT constraintname CHECK (check constraint)HTHJim

Field validation rules cannot refer to other fields in the table so you cannot do this there.However, you can do one table-level validation which you set in table properties.([ACTIVITY_ID] Between 1 And 5) Or ([ACTIVITY_ID] Between 6 And 7 And [SUBJECT] In ('Other','IT'))Otherwise you would have to use a Form_Beforeupdate event procedure, or other suitable event procedure to apply the check during data entry.