473,473 Members | 1,861 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Expression with "No Value"

JustJim
407 Recognized Expert Contributor
Just when I thought I was getting my head around Null values....

I have a report with three sub-reports, on each sub-report footer I count how many records in the subreport. No problemo.

On the Detail section of the main report, I have a text box which adds up all these counts and shows how many (people) in total. Again, no problems... as long as there is at least one entry in each sub-report. Ahh thinks I, I must trap for null values.

Sadly, however, that didn't work either. When I put a breakpoint in and go to the immediate window, I can debug.print the values of the textboxes that do the counting on the sub-reports, except where no people fit the query that feeds the subreports. Surprisingly (to me anyway) when I try to print that one, I don't get the Null I expected, I get
Expand|Select|Wrap|Line Numbers
  1. Run-time error 2427
  2. You entered an expression that has no value
Any ideas?

Jim
Oct 15 '07 #1
7 10734
Rabbit
12,516 Recognized Expert Moderator MVP
What is the expression that you entered?
Oct 15 '07 #2
nico5038
3,080 Recognized Expert Specialist
Surround your variables with the NZ() function like:
Expand|Select|Wrap|Line Numbers
  1. =NZ([variable1])+NZ([variable2])+NZ([variable3])
  2.  
Nic;o)
Oct 15 '07 #3
JustJim
407 Recognized Expert Contributor
Surround your variables with the NZ() function like:
Expand|Select|Wrap|Line Numbers
  1. =NZ([variable1])+NZ([variable2])+NZ([variable3])
  2.  
Nic;o)
Morning All,

On the sub-reports, I have
Expand|Select|Wrap|Line Numbers
  1. =Count(Nz([GroupCode]))
Although I did try
Expand|Select|Wrap|Line Numbers
  1. =Nz(Count([GroupCode]))
(sanity prevailed before I tried
Expand|Select|Wrap|Line Numbers
  1. =Nz(Count(Nz([GroupCode])))
On the main report, I have three text boxes with
Expand|Select|Wrap|Line Numbers
  1. =srptContactByGroupForGroupProfileReportControl.Report!txtCountContact
(Above line not appearing properly, it should be
=srptContactByGroupForGroupProfileReportControl.Re port!txtCountContact
Without the space, which is still appearing even though I'm typing straight into the message board not pasting!!!)


where srptContactByGroupForGroupProfileReportControl is the name of the subreport control and txtCountContact is the name of the text box on one of the subreports. Also on the main report I have another text box with
Expand|Select|Wrap|Line Numbers
  1. =[txtBlindCountFacilitator]+[txtBlindCountContact]+[txtBlindCountMember] & " (Including Facilitator and Contact)"
where the txtBlindCountXXX's are the three text boxes mentioned above. The round-about method came about because just summing the subreport textboxes wasn't working and I wanted to see what was going on.

What happens is than when there is nobody that meets the query that feeds one of the sub-reports (usually the Contacts one) the total on that sub-report footer doesn't show and the "transfer" text box on the main report shows #Error and so naturally does the total text box on the main report.

Is that clear as mud?

Jim
Oct 15 '07 #4
Rabbit
12,516 Recognized Expert Moderator MVP
For the 3 txtBlindCount controls, try this for the control source: =iif(IsError(SubreportName.Report.ControlName), 0, SubreportName.Report.ControlName)
Oct 16 '07 #5
JustJim
407 Recognized Expert Contributor
For the 3 txtBlindCount controls, try this for the control source: =iif(IsError(SubreportName.Report.ControlName), 0, SubreportName.Report.ControlName)
Hmmm, very cunning. Hang on a minute.

Jim
Oct 16 '07 #6
JustJim
407 Recognized Expert Contributor
Hmmm, very cunning. Hang on a minute.

Jim
Bravo, that got'em. Thanks very much!

Jim
Oct 16 '07 #7
Rabbit
12,516 Recognized Expert Moderator MVP
Bravo, that got'em. Thanks very much!

Jim
Not a problem. Good luck.
Oct 16 '07 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Marcus | last post by:
I'm running into a situation that has me adding a value of "Unknown" to a reference table. I am being pulled between two trains of thought, and was curious to get other's input on in. I give an...
3
by: kj | last post by:
This problem is driving me nuts. The code at the end of this post below works fine with IE, but fails with Mozilla. You can see it in action at http://tinyurl.com/2jvo3 With Mozilla 1.4 and...
1
by: Edward King | last post by:
I have a statement in a asp,like follows£º var str=window.top.main.document.all.contenttext.value; I use IIS5.0 to deploy this asp,then I visit this asp like follows:...
1
by: D.M. | last post by:
Hi, One of the people here at work has designed a database that students will be using to enter data. She has Yes/No selection buttons, which start out grayed out with no value. If a student...
10
by: John Bailo | last post by:
I want to pass a SqlCommand object as a input parameter to a method. I want to pass the SqlCommand "by value" so that any updates to the original object are *not* reflected in the object within...
3
by: Grayscale | last post by:
Hello, When I execute the code below, I get: "Microsoft JET Database Engine (0x80040E10) No value given for one or more required parameters." error message in the first line. Rs.Open...
0
by: Gwen Crutcher | last post by:
I keep getting the error "No value given for one or more required parameters", but not sure why. Can anyone please look at my code snipet and see if you see any reason why I could be getting this...
0
by: service0059 | last post by:
This category is designed to enable you to have all the important information right at your fingertips and create better "sight value". You will learn how karat gold affects appeal and value and...
2
by: 7effrey | last post by:
Hi i was just wondering how i should do this: I have a dropdownlist and a datalist. The datalist will be displayed when a value is selected from the dropdownlist. But if there are no results for...
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
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...
1
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,...
1
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...
0
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...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.