473,385 Members | 1,748 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,385 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 2246
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.