473,509 Members | 11,437 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DCount result in reports

2 New Member
I want to use Dcount to return a value that I can post back into a report. This must be straightforward but I can't get it to work! The text below is in the report open event. Text44 is an unbound text box in the report. 'intx' is returning the correct value. I get the error 'can't assign a value to this object' and it breaks at the Me.Text44.Value line. What am I doing wrong?

====

Dim intx as String

intx = DCount("DAYS_BETWEEN_RECEIPT_AND_VAL", "TBL_APPS_REG", "[DAYS_BETWEEN_RECEIPT_AND_VAL] between 0 and 2")

Me.Text44.Value = intx

======

Thanks in advance for any help/guidance. Cheers
Oct 26 '07 #1
3 1923
Rabbit
12,516 Recognized Expert Moderator MVP
I want to use Dcount to return a value that I can post back into a report. This must be straightforward but I can't get it to work! The text below is in the report open event. Text44 is an unbound text box in the report. 'intx' is returning the correct value. I get the error 'can't assign a value to this object' and it breaks at the Me.Text44.Value line. What am I doing wrong?

====

Dim intx as String

intx = DCount("DAYS_BETWEEN_RECEIPT_AND_VAL", "TBL_APPS_REG", "[DAYS_BETWEEN_RECEIPT_AND_VAL] between 0 and 2")

Me.Text44.Value = intx

======

Thanks in advance for any help/guidance. Cheers
This is a roundabout way of doing it. Just set the control source of the text box to your DCount function.

Also, the reason it's not working is most likely because you're using the wrong event.
Oct 26 '07 #2
trafford
2 New Member
I see what you mean - thanks for your help
Oct 29 '07 #3
Rabbit
12,516 Recognized Expert Moderator MVP
I see what you mean - thanks for your help
Not a problem, good luck.
Oct 29 '07 #4

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

Similar topics

1
1535
by: Simon Matthews | last post by:
Hope someone can help an Access beginner! I've just started keeping my surgical logbook on access and it's a simple flat-file affair. I have created several queries that will list cases...
6
3305
by: Mike Conklin | last post by:
This one really has me going. Probably something silly. I'm using dcount for a report to determine the number of different types of tests proctored in a semester. My report is based on a...
1
2620
by: kaosyeti | last post by:
so i'm new to access but i've done a lot in the last 3 months since i looked at it for the first time back then. so when i finished my first db for my job, i cut it close to the end of the year...
2
1783
by: Kaspa | last post by:
Hello I am trying to create dcount field but is not working I have tried every way possible and I can't get it to work. here is my code: =Dcount("","qryTotalscratched"," in (6,7,8,9) and ...
2
1733
by: Kaspa | last post by:
Hello I am trying to create dcount field but is not working I have tried every way possible and I can't get it to work. here is my code: =Dcount("","qryTotalscratched"," in (6,7,8,9) and ...
2
7927
by: Wingz | last post by:
Hiya, Fairly new to Access and was wondering what the best way to perform Dcounts on groups in an Access report. For example, I have 10 employees and the different instances of jobs they can...
4
2346
by: Michael R | last post by:
I have what seems to me a strange problem. I have a continous form, toggle buttons of a field, a text control, and a command's button caption. When I write the following in the text control's...
1
1157
by: weety | last post by:
Hi =DCount("*","qryBc003_2_Xstats") The above syntax which was working for old tables is not working for new tables or queries , I have updated the changes the new query is working fine with...
1
1584
by: kkronline | last post by:
Hello all My SQL View of my Query in Access 2002. SELECT Result.LotName, DCount("","Result"," >21") AS Expr1 FROM LotProperty INNER JOIN Result ON LotProperty.LotName = Result.LotName GROUP BY...
0
7237
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7417
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...
0
7506
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
5659
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,...
0
3219
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...
0
3210
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1572
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
780
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
445
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...

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.