DataBase - Calculations with empty fields

Asked By Learning as I go
20-Nov-09 03:17 PM
I have a report that is calculating total elapsed time between dates.  I have
the calculation working fine if all fields are filled in.  However, out of
necessity there will always be fields that are not filled in yet (because the
orders have not yet arrived, shipped, etc.).  I am (of course) getting the
remain blank until the orders have arrived, shipped, etc.

I am pretty sure that I need to use .hasdata, but can not quite get it to
work.  My expression for the calculated fields is below.

=Workdays([FirstDate],[SecondDate])

I would greatly appreciate any help you can give.
--
Thank you for your time and assistance!

Elizabeth
Report
(1)
SecondDate
(1)
FirstDate
(1)
Workdays
(1)
Subreport
(1)
Hasdata
(1)
  John Spencer replied to Learning as I go
20-Nov-09 03:53 PM
HasData is used to determine if a report or subreport has data.

For individual fields you need to test if the field is null or not.

=IIF(IsNull([FirstDate]) or IsNull([SecondDate]), Null,
Workdays([FirstDate],[SecondDate]))

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
  Learning as I go replied to John Spencer
23-Nov-09 10:30 AM
Thank you so much.  I was obviously looking at it all wrong Friday.
--
Thank you for your time and assistance!

Elizabeth
Create New Account
help
Displaying parameter query dates in a report? DataBase I want to base a report on a query which used parameters to select dates. How can I include the dates I have chosen in my report? Access Reports Discussions Report (1) SecondDate (1) FirstDate (1) TableName (1) DateOne (1) DateTwo (1) Add an unbound control to the report header. Set it's control source to: = "For sales between " & [Enter Start Date] & " and " & [Enter not reply to personal e-mail I use this approach, and bind textboxes to the FirstDate and SecondDate fields: PARAMETERS [DateOne] DateTime, [DateTwo] DateTime; SELECT *, [DateOne] AS FirstDate, [DateTwo] AS SecondDate
Combine report DataBase On the A report, I would like to link or insert the total field that is on the other report, report B. Is there away that I can make the report A shows the report B textbox ? Please help. Thanks Chi Access Reports Discussions Report (1) Chi (1) Subreport (1) Textbox (1) DEWEY (1) Use a subreport. - - KARL DEWEY Build a little - Test a little No, not unless report B is displayed as a subreport on report A. If report B is not used
Page Footer DataBase hi, here's my scenario of my problem i had one report (Report A) and it has a page footer once i viewed it the page footer appears, but when i sub report the Report A on a another report (Report B) the page footer of Report A does show and it supposed to be shown at the page footer of Report B. its there anyway to show the page footer of Report A to Report B
Count and Filter Result DataBase My report has = Count(*) in the group header and I want to filter the results. Report Example: IDnumber Group Header Total of Reports Last Name First Name Idnumber 2 Smith Joe show the records of reports with the total of 4 or more. Access Reports Discussions Report (1) DateDiff (1) Ccumodsactionsother (1) Ccusanctionsother (1) Dateofreport (1) Reviewdate (1) Sonya (1) Unit (1) Try this in the query used as source for the report - -- SELECT [Last Name], [First Name], [Idnumber], Count([Idnumber]) AS [Total of Reports] FROM YourTable WHERE current code for my query. Where would I put the below infromation? SELECT [Minor Disciplinary Report].Last, [Minor Disciplinary Report].First, [Minor Disciplinary Report].IDnumber, [Minor Disciplinary Report].Unit, [Minor Disciplinary Report].Dateofreport, [Minor Disciplinary Report].[Gpsanction 1], [Minor Disciplinary Report].[Asddsanctions 1