By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,484 Members | 1,764 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,484 IT Pros & Developers. It's quick & easy.

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

P: 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.

Share this Question
Share on Google+
4 Replies


P: 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

P: 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

P: 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

P: 68
Thanks PGAC; I have decided to go with your first suggestion.
Jun 26 '12 #5

Post your reply

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