473,396 Members | 2,129 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Report Error#2448: You Can't Assign a Value to This Object

68
Good day all,

I know that this error has been discussed before, but all the discussions were forms-based discussions. Thus, I am sorry if you found this question repeated.

I have a report that lists the tasks' score by employee. Along with each task's score there is a Grade Report bound control. The default value of this control is set to 0%. In some cases, you find that the task's score is null, which means the employee has not yet worked on this task. However, you still see the value of the Grade Report shown up which is 0% (Deafult value).

Now, I don’t want to this value to show up if the task wasn't started. So, I tried the below code to set the Grade Report control to Null, but I got this error "2448: You Can't Assign a Value to This Object".

Expand|Select|Wrap|Line Numbers
  1. Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
  2.  
  3. If IsNull(ProgressCtrl) = True Then
  4.             [Grade Report] = Null
  5.         End If
  6.  
  7. End Sub
  8.  
Appreciate any idea to get around this error?

Thanks
Jun 23 '12 #1

✓ answered by PGAC

Hi ahd2008,


Why have a default value of 0%? Why not use a Null value to indicate an unstarted task? Try taking away the default value of 0% and see how that works, that way you would not need some code to "sort out" the data. You would have to remove all those 0%s that correspond to unstarted tasks from the relevant tables though.

4 3227
PGAC
7
Hi ahd2008,


Why have a default value of 0%? Why not use a Null value to indicate an unstarted task? Try taking away the default value of 0% and see how that works, that way you would not need some code to "sort out" the data. You would have to remove all those 0%s that correspond to unstarted tasks from the relevant tables though.
Jun 23 '12 #2
ahd2008
68
Hi PGAC

Thanks for your response; that's the first thing came across my mind, but I was wondering if there is an easier way to get around this error rather than updating all the unstated tasks and remove the zero value from the Grade Report. Anyhow, thanks for your suggestion and I guess it is best approach to tackle the problem at its roots
Jun 25 '12 #3
PGAC
7
I suppose you could try using an IIF in the report's underlying query:

Expand|Select|Wrap|Line Numbers
  1. [Grade Report Calc]: IIF([Grade Report]=0,"",[Grade Report])
This returns a zero-length string if the grade report is zero.
Jun 25 '12 #4
ahd2008
68
Thanks PGAC; I have decided to go with your first suggestion.
Jun 26 '12 #5

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

Similar topics

1
by: Carol | last post by:
Hi, I am using VB.NET2003 on a Windows XP. I tried to write a simple program to send email with attachment (see below for the code). I add reference to "Microsoft CDO 1.21 library" and "Microsoft...
2
by: kma | last post by:
I am designing an Access 2000 database on a computer running Windows 98. I have one form with several tabs; all of which have sub forms, some with a subform on a subform. For example, on my...
10
by: DataBard007 | last post by:
Hello Access Gurus: I use Win98SE and Access97. I just built a simple Access97 application which holds all contact information for my personal contacts, such as first name, last name, address,...
0
by: Paul Malcomson | last post by:
Hi. I'm having terrible trouble with a form that displays several parent/child relationships at one time. It is a sales force hierarchy - Sales force, district, territory, sales rep are the...
3
by: Ñ©ÔÆÓ¥ | last post by:
Hi,all I have a trouble about struct variable,the detail is : I define a new struct which name ServiceProperty,then I declare a variable like this: ServiceProperty instService = null; ...
26
by: Brett | last post by:
I have created a structure with five fields. I then create an array of this type of structure and place the structure into an array element. Say index one. I want to assign a value to field3 of...
1
by: No_Spam | last post by:
I have an MS Access form attached to a table. I have a text box which has its control source set to a field in the table... However, at run time if certain things change, I want to the change the...
4
by: philelpko | last post by:
Morning all, Not a clue why the hell this doesn't work so any help is most appreciated!! Using one form I allow the user to filter the records using combo boxes. Works fine, all the filtered...
17
by: zombiezoom | last post by:
I need help with error 2448: You can't assign value to this object. What I am trying to do is allow user to select event id and race id from combo option. Once the user selects those, then the id...
3
by: dmaclam | last post by:
all this code is in its own c# class. The error fires on line 84. The object is created on line 27 in the ConnectToServer() method. I have checked and the ConnectToServer method is called before the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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
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...
0
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
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
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...

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.