suppress printing line in report

  • Thread starter Thread starter RichK
  • Start date Start date
R

RichK

Created Access 2003 database of projects. Created report that summarizes
costs for each month. Want to suppress printing for installation dates that
have no date in them - means they weren't completed yet and therefore no
cost. Could have some installed projects that have 0 cost so I can't use
that for selection criteria.

So bottom line is: I don't want to print a line with blank/null installation
date. Been looking at other questions posed using IIF statement but haven't
found anything that works yet. Also, not sure if I place them Detail group,
Event box, On Print box?

Not real good with VBA so the more explicit you can be with your statements
the better (I hope) I will understand.
 
RichK said:
Let me also state that there are other fields in the report line but I want
to skip printing the detail records when Install Date is not populated so I
don't think the Shrink and Grow are going to be useful?


The report's record source should be a query that has
Is Not Null
for the date field's criteria.
 
Marshall Barton said:
The report's record source should be a query that has
Is Not Null
for the date field's criteria.
I am not sure what that will accomplish other than making sure that field is
not null. When I tried to do that, I got all kinds of messages like "Data
integrity rules have been changed; existing data may not be valid for the new
rules". "Existing data violates the new setting for the "Validation Rule"
property for Installation Date." But the data is still showing up for these
records. Is there something else that I need to do along with this?
 
RichK said:
I am not sure what that will accomplish other than making sure that field is
not null. When I tried to do that, I got all kinds of messages like "Data
integrity rules have been changed; existing data may not be valid for the new
rules". "Existing data violates the new setting for the "Validation Rule"
property for Installation Date." But the data is still showing up for these
records. Is there something else that I need to do along with this?

I have solved the problem - created a query to exclude the "bad" data and
used that query file as input to my report and all is good. Thanks for your
help.
 
RichK said:
I am not sure what that will accomplish other than making sure that field is
not null. When I tried to do that, I got all kinds of messages like "Data
integrity rules have been changed; existing data may not be valid for the new
rules". "Existing data violates the new setting for the "Validation Rule"
property for Installation Date." But the data is still showing up for these
records. Is there something else that I need to do along with this?


I don't see how a query can get those messages. Please post
a Copy/Paste of the SQL view of the query you used.
 
Marshall Barton said:
I don't see how a query can get those messages. Please post
a Copy/Paste of the SQL view of the query you used.

Marsh,
I actually got the solution from going through some other posts finally. I
created a query against the original file, excluding null values for the
Installation Date field. I then used that file as input to the report and
voila - those values were not included. Thanks very much for your help on my
behalf and on behalf of those who are looking to expand our knowledgebase.
 
RichK said:
I actually got the solution from going through some other posts finally. I
created a query against the original file, excluding null values for the
Installation Date field. I then used that file as input to the report and
voila - those values were not included. Thanks very much for your help on my
behalf and on behalf of those who are looking to expand our knowledgebase.


Sigh. That's exactly what I was trying to tell you. I
still have no idea what you did to get those errors, but
clearly you went off on a different track.
 
Marshall Barton said:
Sigh. That's exactly what I was trying to tell you. I
still have no idea what you did to get those errors, but
clearly you went off on a different track.
Sorry for the frustration - this access thing is new to me. Sometimes when
I read the posts and responses I get lost in the solutions. But I persisted
and when I look back at your responses now, they make sense. Thanks again
for your help in this matter and on behalf of all others, thanks for caring
and lending a helping hand.
 
Marshall Barton said:
Sigh. That's exactly what I was trying to tell you. I
still have no idea what you did to get those errors, but
clearly you went off on a different track.

Now however, because of the Is Not Null use in the query, I cannot add a new
project to my database. When I add a new project, the Installation Date is
not known or null in this case. What do I do now?
 
RichK said:
Now however, because of the Is Not Null use in the query, I cannot add a new
project to my database. When I add a new project, the Installation Date is
not known or null in this case. What do I do now?


I don't understand what a report's query has to do with
adding new records. How are you trying to add new records?
Not by using the same query I hope.

You should be using a form based on a different query that
limits the data to some severely limited or empty set of
records.
 
Marshall Barton said:
I don't understand what a report's query has to do with
adding new records. How are you trying to add new records?
Not by using the same query I hope.

You should be using a form based on a different query that
limits the data to some severely limited or empty set of
records.

I am just stupid - in the table, for that field, in the Data Validation
Rule, I also had Is Not Null. Took that out and all is well. Again, sorry
for the confusion. Live and learn.
 
Back
Top