If NoData Question

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi there! Using A02 on XP. Have a report that I would like to have printed on
it "There is no data for this report" rather than have the message appear in
the OnNoData event. When there is no data my one unbound text box shows
'#Error'. The other fields are blank. Here is my text box: =[EditDetail1] &
" " & [EditDetail2]

How can I do an IIF on no record count or is that even the best way to do
this? Would like to print the report to put in the file to show there were no
edits.

Thanks in advance for any help or advice.
 
You can use a control source like:
=IIf(HasData, [EditDetail1] & " " & [EditDetail2] , "There is no...")
 
Duane,

You are, as usual, a lifesaver. Thank you SO much for helping out like you
do. Works great. I was looking at it backwards.
--
Bonnie


Duane Hookom said:
You can use a control source like:
=IIf(HasData, [EditDetail1] & " " & [EditDetail2] , "There is no...")

--
Duane Hookom
MS Access MVP


Bonnie said:
Hi there! Using A02 on XP. Have a report that I would like to have printed
on
it "There is no data for this report" rather than have the message appear
in
the OnNoData event. When there is no data my one unbound text box shows
'#Error'. The other fields are blank. Here is my text box: =[EditDetail1]
&
" " & [EditDetail2]

How can I do an IIF on no record count or is that even the best way to do
this? Would like to print the report to put in the file to show there were
no
edits.

Thanks in advance for any help or advice.
 
Duane Hookom said:
You can use a control source like:
=IIf(HasData, [EditDetail1] & " " & [EditDetail2] , "There is no...")

--
Duane Hookom
MS Access MVP


Bonnie said:
Hi there! Using A02 on XP. Have a report that I would like to have printed
on
it "There is no data for this report" rather than have the message appear
in
the OnNoData event. When there is no data my one unbound text box shows
'#Error'. The other fields are blank. Here is my text box: =[EditDetail1]
&
" " & [EditDetail2]

How can I do an IIF on no record count or is that even the best way to do
this? Would like to print the report to put in the file to show there were
no
edits.

Thanks in advance for any help or advice.
 
I am very new to Access and really need your assistance. I work in HR. and
have created an Access table for our recruiters to capture dates, candidate's
name, job reqs, intervied, hired and other pertenent data. Here's the
problem(s), (1) some job requisitions do not have req numbers, just titles.
In my report, I need to capture the number of reqs without duplications,
i.e., if the job title was Financial Analyst and we had 6 candidates to
apply...they only applied to one req...and with out a req number. I know not
to use =Count(*) because that counts the records. How and what do I use to
report the data? and

(2) I have a check box that I have specified 'yes/no'. I just want to count
the 'yes' fields...what do I use?

Thank you so very much
 
To count Yes values use
Abs(Sum(NameOfCheckboxField))

The field will actually have one of two values True (-1) and False (0). So
summing all those will yield a negative count of the Yes values. Abs removes
the negative sign by returning the absolute value of the sum.

Count([Req numbers]) will count the number of times there is a value in the
Req number field. Count([Req Titles]) will count the number of times there is
a value in the Req Title field.

I think you want a unique count of requisitions. This is more difficult to do
and you would need to give us more information on your report. For instance,
do you restrict the data in the report to a date range? Do you sort the
report by requisition number or requisition title?

One method uses inserting a group level based on the requisition number and
inserting a control to count the number of times the group level is used.
Then in the bottom of the report, you can grab the value of the counter and
display that as the unique count.

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
 
Back
Top