473,396 Members | 2,021 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

validate data

Hi all I have a question that I cant seem to find an answer to.

I am fairly sure this will be an easy one. I have two tables in Access. One is current employees, one is termed employees. I want to set up a rule to where if I try to type in an SSN of a new employee in the current employees table and it already exsists in the termed employees table it will not allow the entry. Any suggestions?
Mar 25 '08 #1
3 1419
FishVal
2,653 Expert 2GB
Hi, Mark.

What is a special reason to deal with 2 tables instead of one?
It seems that reading aboutDatabase Normalization and Table structures would be useful for you.

Kind regards,
Fish.
Mar 25 '08 #2
Well I have two tables one for teminated employees which we need to keep and one for current employees. When I put a SSN into the active employees table if that entry is already there access will not allow the entry becasue its the primary key. I want to be able to do the same thing but check the SSN against the terminated table while entering it into the active table.
Mar 26 '08 #3
FishVal
2,653 Expert 2GB
Hi, Mark.

You certainly may do it the way you like but this way it will be more complicated and less reliable to prevent record duplication.
A general approach is to have an additional field in a table, let us say it is boolean and set to True or False indicating whether employee is current or "teminated" (? ;)). Or it may be a lookup field to indicate more possible statuses. This way you may create an index on [Employee SSN] field or make it PK.
There is no need and nothing suitable in two separate tables.

Regards,
Fish
Mar 26 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: FabFreddy | last post by:
Hi, I can't find out what the problem is with the error message below! I get it when I go from one to another page with controls in these pages. Anyone knows??? THX Unable to validate...
7
by: fingermark | last post by:
I'm writing an upload script and would like to know what is the safest way to validate a file type that is being uploaded to a server? I am accepting just bmp, jpg, png, and gif. Here are is...
2
by: IanT | last post by:
Hi I need help with my approach to validating de-serialized XML received via webservice. Hopefully someone can point me to sources detailing best practice for the following. I agreed a...
4
by: Wysiwyg | last post by:
I need to validate a form to ensure that all of the fields add up correctly. I can't do this while the user is entering data since validation needs to be done after the entry is completed. What's...
10
by: Mike Logan | last post by:
I am using the "contract first" design methodology. Contract First is design the WSDL first then design the server and client. However I must design my XSD/XML Schema before anything. I am...
4
by: Mike Fellows | last post by:
running IIS on a single server, hosting pages on an intranet basis, one single user out of 50 is having an unable to validate data issue how do i fix this (the microsoft KB is a little...
3
by: c676228 | last post by:
Hi everyone, I just realized that it's so important to validate each string, I mean 'each' before you insert data from asp page into database. I guess some customers just copy data from some...
11
by: jjbutera | last post by:
I know how to use the ErrorProvider in my winforms..or do I? I validate the values and set the ErrorProvider in the validating event. If not valid, I set e.Cancel = True. I clear the ErrorProvider...
4
by: Brybot | last post by:
I have a form that i've split up into multiple asp:panels, each panel has a number of validators which work correctly. At on the last panel, i want to commit the data collected to a database. I...
1
by: SkipNRun | last post by:
I am a novice when comes to JavaScript, AJAX. I am working on a form, which will allow users to update their contact information. In order to make the form flexible, I need to use pull down list. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.