I am having trouble creating a report

G

Guest

I created a data base that has 1 main table and 6 sub-tables. The main table
has the ID field as an auto number. Each sub-table has the ability to have
multiple entries. Each sub-table entry has a date completed field. I am
trying to create a report that will query each sub-table and return a yes if
the date field is not null or no if the date field is null. My question is
how do I create a query that returns a Yes or No (or could be 1 or 0) if the
date is there or not.
I am a new user to Access.
 
G

Guest

For each field that might have a null you need something like this:

IsOrg: IIf(IsNull([ORG])=True,"No","Yes")

Another option would be to use the NZ() function. It returns the data if not
null or what you want if null:

Orgs: NZ([ORG],"No")
 
G

Guest

Will this work for a Date Field?
--
clcnewtoaccess


Jerry Whittle said:
For each field that might have a null you need something like this:

IsOrg: IIf(IsNull([ORG])=True,"No","Yes")

Another option would be to use the NZ() function. It returns the data if not
null or what you want if null:

Orgs: NZ([ORG],"No")
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.

clcnewtoaccess said:
I created a data base that has 1 main table and 6 sub-tables. The main table
has the ID field as an auto number. Each sub-table has the ability to have
multiple entries. Each sub-table entry has a date completed field. I am
trying to create a report that will query each sub-table and return a yes if
the date field is not null or no if the date field is null. My question is
how do I create a query that returns a Yes or No (or could be 1 or 0) if the
date is there or not.
I am a new user to Access.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top