Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

validation rule

ResolvedVersion 2003

Daiga has attended:
Access Intermediate course

Validation rule?

Let's say I need to have two fields on my'annual returns' form - Year and specific code (specific vaccination centre number, which is 'autonumber'aswell ). I need to make sure that the centre number doesn't have two records for each year. The centre number is for example '1234' and they are submitting one form for each year, which is then entered on my database. How do I need to set up my databse? Is it a validation rule that I need to define?
Many thanks

RE: validation rule?

Hi Daiga

Thanks for your question

Assuming that the form is taking its data from a single table, the the best option would to make the form's primary key, a compound of year and centre number. This would then mean that you could only ever enter one record per centre per year.

If you have any further problems please do not hesitate to follow up and I'll give you further guidance

Regards

Stephen

Thu 11 Mar 2010: Automatically marked as resolved.

 

Training courses

Training information:

See also:

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.

Access tip:

Insert The Current Date

To insert the current date into a Table field or Form Text box use:

Ctrl+Semi-Colon(;)

View all Access hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.09 secs.