We help IT Professionals succeed at work.
Get Started

Trigger to validate lookup tables - sql server 2005, Access front end

Last Modified: 2013-11-28

I have lookup tables in my database. The client wants to ensure that usres can not make any changes to the tables while they do the dataentry using ACCESS (adp) front end which is connected to sql 2005 database.

They do not want to use form validation however they asked for using triggers to validate and generate error message if anyone wants to delete or update a value but it should allow to insert new values.

Lets say  I have a lookup table AgeGroup with columns: ID, AgeGroup

ID           AgeGroup
1            0-5
2            6-10

how can I right the trigger as well as display error message?

Thanks in advance
Watch Question
Senior DBA
Most Valuable Expert 2018
Distinguished Expert 2019
This problem has been solved!
Unlock 2 Answers and 26 Comments.
See Answers
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE