Querying the field names

Che3zy

New member
Local time
Today, 21:41
Joined
Dec 7, 2011
Messages
4
Possibly a simple solution to this, but I can't get my head round this...

I have a table with 60+ fields, some are mandatory, some are not (we'll call this one call data). I have another table that defines whether the fields in "call data" are mandatory.

What I would like to do is output any records in "call data" where the field is mandatory but has no entry.

Any tips?
 
Create a query joining both the tables.
In the 'call data' column, in the criteria row put
Is Null OR "" to pick up all rows where there is no entry for call data.

You also need to put in criteria for the column that defines whether 'call data' is mandatory - set the criteria so only mandatory call data is shown.
 
Unfortunately this did not work. There are no common fields between the 2 tables, "Call Data" is a table with 60+ fields, the other is a table with "call data"'s fields as entries.

eg.

Table - Call data:

Number, Dialled, Cost, etc...
777777, 111111, 1.5, etc
666666, 222222, 1.2, etc

Table - Definitions:

Field, Mandatory?
Number, Yes
Dialled, Yes
Cost, No
etc, etc

I need to look against all entries in "Definitions" and produce a table containing all fields in "call data" where the field is mandatory as per "Definitions" and null in the field in call data
 
Please post some sample data of this one
the other is a table with "call data"'s fields as entries.
 
Create a query based on the table of Call data.
Include only those fields that are mandatory.

You want all rows where any of the columns of the query are null.

In the query designer of the query already created with only the mandatory fields,
in the criteria row of the 1st colum put
Is Null.

Go to the next column of the query and move down to the next criteria row and put
Is Null.

Go to the next column of the query and move down to the next criteria row and put
Is Null
and so on till you have done all the columns of the query.

If you were writing the query in sql, you would use the OR operator, not the AND operator, for the criteria part of the query.


Note that Number is a reserved word in Access and should not be used for a field name. You appear to have a field called Number and I suggest you change it to something like CalledNumber.

Here is a link about reserved words:
http://allenbrowne.com/AppIssueBadWord.html
 

Users who are viewing this thread

Back
Top Bottom