Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help validating data in Access

Status
Not open for further replies.

sherree

Technical User
Apr 27, 2000
16
0
0
US
Help Me!

I have a table where I need to test one of the fields (called CPT/ICD-9)against another table (called code value).

Example Data:

Form Element Table

CPT/ICD-9 Element Name
10001 Anesthesia
12000 Biospy
Code Value Table

Code Value Code Desc
10001 Anesthesia
12001 Biospy

IF the code value cannot be found the output should list the code value and error msg "not current, Update your Encounter Form"

I really appreciate anyone's help!

Thank You
Sherree
 
How are you going to achieve this? Is this data from text boxes on a form? Is it being initiated by a button?

Please tell us exactly what you need to do:

(i.e. A user enters data into 2 text boxes, then clicks on a button. When the button ........).
 
Thanks for responding Jimmythegeek,

I need to achieve this from a button on a form.
The form is an excel spreadsheet that I imported which has
the code values and I have to check these code values against the code value table to see if they are current.

Thanks Again,
Sherree
 
I'm not sure how you want it to work, but if you are just trying to compare, then you should be able to create a query, and link the CPT/ICD-9 field to the Code value field, and it will show you which ones match, and don't match.

Copy and paste the following SQL into the SQL View of a new query. This is assuming your table names are Form Element and Code Value, and the field names are what you listed above. If they are not, then you will need to change them appropriately (in red).

==========
SELECT [Code Value], [Code Desc], [CPT/ICD-9], [Element Name]
FROM [Code Value] LEFT JOIN [Form Element] ON [Code Value].[Code Value] = [Form Element].[CPT/ICD-9];
==========

This should give you a list of all the records in the Form Element table, and whether or not they match.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top