PC Review


Reply
Thread Tools Rate Thread

Check if a value is legal

 
 
atledreier
Guest
Posts: n/a
 
      4th May 2010
I have some fields I need to check against another table.

The scenario:

My users have been inputting data in my tables through queries up
until now. i've realized I'm going to need a few lookuptables to
verify their input, but there's some 10.000+ records that needs to be
checked. So I've made the lookup tables but I thought I'd make it a
little easier for my users to verify their data with a query that
returns records with faults.

I've made a query that returns al the NULL values and a continuous
form that mark the empty but required fields with yellow background
through autoformat. I'd love to have the invalid entries marked with
red text. I think i can handle that if i get a query that returns the
invalid records.
 
Reply With Quote
 
 
 
 
Tom van Stiphout
Guest
Posts: n/a
 
      4th May 2010
On Tue, 4 May 2010 01:33:12 -0700 (PDT), atledreier
<(E-Mail Removed)> wrote:

The basic idea for such query is:
select * from myTable
where myField not in (select myField from myLookupTable)

-Tom.
Microsoft Access MVP


>I have some fields I need to check against another table.
>
>The scenario:
>
>My users have been inputting data in my tables through queries up
>until now. i've realized I'm going to need a few lookuptables to
>verify their input, but there's some 10.000+ records that needs to be
>checked. So I've made the lookup tables but I thought I'd make it a
>little easier for my users to verify their data with a query that
>returns records with faults.
>
>I've made a query that returns al the NULL values and a continuous
>form that mark the empty but required fields with yellow background
>through autoformat. I'd love to have the invalid entries marked with
>red text. I think i can handle that if i get a query that returns the
>invalid records.

 
Reply With Quote
 
Bruce Meneghin
Guest
Posts: n/a
 
      4th May 2010
This will get you the invalid records. You'll need extra to figure out which
fields to turn red.

Table1 table you are looking for invalid records
Field1
Field2
Field3
lookup1 table with valid values for Table1.Field1
lookup2 table with valid values for Table1.Field2
lookup3 table with valid values for Table1.Field3

SELECT Table1.Field1, Table1.Field2, Table1.Field3
FROM ((Table1 LEFT JOIN lookup1 ON Table1.Field1 = lookup1.Field1) LEFT JOIN
lookup2 ON Table1.Field2 = lookup2.Field1) LEFT JOIN lookup3 ON Table1.Field3
= lookup3.Field1
WHERE (([lookup1]![Field1] Is Null) OR ([lookup2]![Field1] Is Null) OR
([lookup3]![Field1] Is Null));


"atledreier" wrote:

> I have some fields I need to check against another table.
>
> The scenario:
>
> My users have been inputting data in my tables through queries up
> until now. i've realized I'm going to need a few lookuptables to
> verify their input, but there's some 10.000+ records that needs to be
> checked. So I've made the lookup tables but I thought I'd make it a
> little easier for my users to verify their data with a query that
> returns records with faults.
>
> I've made a query that returns al the NULL values and a continuous
> form that mark the empty but required fields with yellow background
> through autoformat. I'd love to have the invalid entries marked with
> red text. I think i can handle that if i get a query that returns the
> invalid records.
> .
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing XP Pro Retail Legal Key to XP Pro Legal OEM Key Mrjota Windows XP Setup 1 26th Aug 2008 08:01 PM
Installing legal windows on not so legal windows machine... sandsdenver@hotmail.com Windows XP Setup 2 10th Oct 2006 11:57 PM
How to check if it is legal jr Microsoft Windows 2000 3 28th Jul 2005 10:37 PM
Legal terms added to spell check =?Utf-8?B?RGlhbmUgUGF1bGw=?= Microsoft Word Document Management 1 5th Jun 2005 04:32 PM
Get legal Bcbmicro Windows XP General 2 17th Aug 2003 01:58 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:33 AM.