473,654 Members | 3,022 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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. "SkilledTra de" 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 "SkilledTra de" (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 2259
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, [SkilledTradeTyp e], "No")

where [SkilledTrade] is the name of the Yes/No field and SkilledTradeTyp e 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 [SkilledTradeTyp e]; 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.goo gle.com...
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. "SkilledTra de" 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 "SkilledTra de" (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
6112
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 page. Instead I am getting a new table layout for each day of the week. I have tried grouping on every record and combination I can, manipulating the Group Properties but can't get it right. I have the entire report in the Detail Section, with...
2
1806
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 courses taken by that person. I ask the user for Start and End dates to allow them to see only courses that fall into that date range. I'm then trying to open the report to show the current employee with a list of courses that fall within the date...
1
2166
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 want to be able to indicate employees who have a hire date that is within 90 days of the current date and highlight their records in the form and report with a yellow background. How would this be best accomplished using DateDiff or DateAdd? ...
4
4223
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 the difference between each scan. Something like below. I have spent days on this and can't figure it out. Date Time Login Diff 04-Dec-03 23:33:12 27478 04-Dec-03 23:33:38 27478...
1
17657
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 Create a Dynamic Crosstab Report PRODUCT :Microsoft Access PROD/VER:1.00 1.10 OPER/SYS:WINDOWS
2
1405
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 and sex). Simple enough, but the DB is used to record journal entries and adjustments. If a patient gets recoded, then that is entered as a separate record with a negative unit. Typically there are three records: patient# treatment# ...
1
3728
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 statistical purposes. I've been using Here’s the situation: I have two main tables: Guest (stores data such as GuestID, First Name, Last Name, etc.) and Services (stores data such as the type of service the guest used (Shelter Bed, Lunch, Dinner,...
2
4442
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 statistical purposes. I've been using Here's the situation: I have two main tables:
7
2045
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 be copied and duplicated back in the original underlying table for that subform. To give a bit more background, the main form contains records of individual ‘reports’ (held in table called CPG1) and the subform (CPG3_Subform) identifies the...
0
8290
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8815
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8707
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
6161
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5622
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4149
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4294
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1916
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1593
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.