By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,594 Members | 3,459 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,594 IT Pros & Developers. It's quick & easy.

Selectively omit records from report based on date

P: n/a
Hi,
I have a database of a bunch of contractors who have signed a safety
agreement with us, their contact info, their insurance info, etc. Each
was assigned an ID number as the main key. Each contractor agreement
has an expiry date. I have a report that lists the contractors and a
couple other relevant fields for reference for our company employees.
But I don't want a contractor to appear on this report (which looks
like a list of contractors) if their contract expiry date has expired.
How can I omit these records from this report?

Another things I wondered about is this: i have a report for
contractor employees who have signed up. Most are unskilled labourers,
but some are skilled. "SkilledTrade" is a yes or no field. And the
next question, "IfYes Type?" is a word answer which is blank if the
previous answer was a no.
I would like the report to have a heading that says "skilled
labourer?" and I would like each record under that heading to say
either "no" or the type. So, I need a code such that the report will
display "SkilledTrade" (if SkilledTrade=no) or only display "IfYes
Type" (eg IfYes Type = "master electrician") if SkilledTrade was a
yes. (so I don't want it to say yes and the type - just the type).

Please be very specific with answers - I am a novice.
Thanks for any help.

Rinee
Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
For the first one you have two options. You can set the criteria in the
query feeding the report or you can set a filter in the report. The criteria
either way would be

[ExpiryDate] >= Date()

This will verify that as of the time the report was printed that the
ExpiryDate field will have a date on or before the date of printing the
report. In the reports Filter property, you would enter as above, in a
query, the field would be the left side of the equation and the criteria
would be the rest, stating with >=.

For the second part, create a calculated textbox on the report. To do this,
you put an equation in the Control Source of the textbox instead of the name
of a field.

Example:
=IIf([SkilledTrade] = True, [SkilledTradeType], "No")

where [SkilledTrade] is the name of the Yes/No field and SkilledTradeType is
the name of the description field. The IIf statement will evaluate the first
part, if True (Yes would be True) then it returns the second part, in this
case the value of the field [SkilledTradeType]; if False, it returns the
third part, which in this case is just the text No.

--
Wayne Morgan
MS Access MVP
"Rinee" <ri******@yahoo.ca> wrote in message
news:80**************************@posting.google.c om...
Hi,
I have a database of a bunch of contractors who have signed a safety
agreement with us, their contact info, their insurance info, etc. Each
was assigned an ID number as the main key. Each contractor agreement
has an expiry date. I have a report that lists the contractors and a
couple other relevant fields for reference for our company employees.
But I don't want a contractor to appear on this report (which looks
like a list of contractors) if their contract expiry date has expired.
How can I omit these records from this report?

Another things I wondered about is this: i have a report for
contractor employees who have signed up. Most are unskilled labourers,
but some are skilled. "SkilledTrade" is a yes or no field. And the
next question, "IfYes Type?" is a word answer which is blank if the
previous answer was a no.
I would like the report to have a heading that says "skilled
labourer?" and I would like each record under that heading to say
either "no" or the type. So, I need a code such that the report will
display "SkilledTrade" (if SkilledTrade=no) or only display "IfYes
Type" (eg IfYes Type = "master electrician") if SkilledTrade was a
yes. (so I don't want it to say yes and the type - just the type).

Please be very specific with answers - I am a novice.
Thanks for any help.

Rinee

Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.