Results 1 to 3 of 3
  1. #1
    nkuebelbeck is offline Advanced Beginner
    Windows 7 Access 2007
    Join Date
    Mar 2010
    Posts
    91

    shot in the dark ' 2448 - You cannot assign a value to this object'

    I get "2448 - You cannot assign a value to this object" When users try to increment the value via a "+" button I have made(see attached image). The strange part is that it's not all the time. Very random actually. So that is why i am reaching for help. Below is the code for the button.


    The application is run using Access runtime 2010 SP1 in a .accdb format. I edit the application via access 2007.

    Private Sub cmdSomeButtonClick_Click()
    On Error GoTo err

    Dim qty%

    If IsNull([ReadonlyFieldInTheAttachedImage]) Then [ReadonlyFieldInTheAttachedImage] = 0

    qty% = Val([ReadonlyFieldInTheAttachedImage])

    qty% = qty% + 1

    [ReadonlyFieldInTheAttachedImage] = qty%

    Exit_cmdSomeButtonClick_Click:
    Exit Sub

    err:
    MsgBox err.Number & err.Description
    Exit Sub

    Ok, so after looking at this. The text boxes control source is a number in the table. The code Val() is trying to convert a string to a number? Is this necessary if the control source is already a number? or is this necessary if the text box control is used?

    as always your help is appreciated.

  2. #2
    nkuebelbeck is offline Advanced Beginner
    Windows 7 Access 2007
    Join Date
    Mar 2010
    Posts
    91

    Over complicated

    Couldn't I just go

    [GreyedOutBox] = [GreyedOutBox] + 1

    ??

  3. #3
    nkuebelbeck is offline Advanced Beginner
    Windows 7 Access 2007
    Join Date
    Mar 2010
    Posts
    91
    bump this up?

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Error 2448
    By gtrudel in forum Programming
    Replies: 9
    Last Post: 07-11-2011, 07:30 PM
  2. Replies: 1
    Last Post: 08-05-2010, 12:11 PM
  3. Replies: 3
    Last Post: 04-15-2010, 09:43 AM
  4. runtime error 2448
    By ds_8805 in forum Forms
    Replies: 3
    Last Post: 04-14-2010, 07:32 PM
  5. Replies: 3
    Last Post: 03-30-2010, 01:21 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums