473,405 Members | 2,445 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Selectively omit records from report based on date

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
1 2247
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: mark | last post by:
How do I get all fields on one page of a report? I have a report that has a column for each day of the week and 6 records for each day. I need each weekday's records returned on only one detail...
2
by: Deano | last post by:
OK, I've been taking the detour from hell trying to sort this and after taking a walk I think I need a rethink. I have a report for a single employee that includes a subreport which lists...
1
by: Scott Sabo | last post by:
I have a form & report based on a query which shows details about employees performance reviews (hire date, review date, review submital date, etc). We do 90 day probation reviews as well and I...
4
by: Mark Reed | last post by:
Hi all, I have a query (query1) which shows scan date, scan time & operator. One scan = 1 record. What I want to do is create a report based on query 2 from query1 which shows all the scans AND...
1
by: Nathan Bloomfield | last post by:
Does anyone know if there is any documentation which relates to Access2k + ? or can anyone help adjust the code? I am having trouble converting the DAO references. TITLE :INF: How to...
2
by: johnds | last post by:
I am researching the use of physician services that are recorded in a billing database of over 10 million records. I am only interested in the patient's treatment type, and their attributes (age...
1
by: RussCRM | last post by:
I need some help getting unique records from our database! I work for a small non-profit homeless shelter. We keep track of guest information as well as what services we have offered for...
2
by: srusskinyon | last post by:
I need some help getting unique records from our database! I work for a small non-profit homeless shelter. We keep track of guest information as well as what services we have offered for...
7
by: Albennett | last post by:
Hello. I’m new to writing VBA code but getting there thanks, for the most part, to the excellent advice on this site. I trying to create the code which will allow all records from a subform to...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.