Results 1 to 5 of 5
  1. #1
    3 Star Lounger
    Join Date
    Sep 2002
    Location
    London, England
    Posts
    294
    Thanks
    0
    Thanked 0 Times in 0 Posts

    You can't assign a value to this object (2000)

    I have a simple form with a subform. Whenever I try to add data to the subform I get the following message:

    You can't assign a value to this object.
    *The object may be a control on a read-only form.
    *The object may be on a form that is open in Design view.
    *The value may be too large for this field.

    None of the suggested reasons is true. I've had a trawl through Google and it looks as though other people have had the same problem, but none of the sites that I found had any solutions. Has anybody seen this before/got any ideas?

    Ian

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: You can't assign a value to this object (2000)

    I'm sorry, that is not enough information. Could you provide details about the form and subform, or post a stripped down version of the database? Thank you.

  3. #3
    3 Star Lounger
    Join Date
    Sep 2002
    Location
    London, England
    Posts
    294
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: You can't assign a value to this object (2000)

    Sorry, I realise my description was low on detail but I had hoped that this was one of those known issue problems that people had seen before and that the detail would be superfluous. The attached zip file contains a stripped down version of the database with the forms and tables that appear to be involved.

    Thanks again

    Ian

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: You can't assign a value to this object (2000)

    There are two problems in tbl_EM_ReportPackages_Details:
    - The PackID field is an AutoNumber field. It should be a Number (Long Integer) field instead, since it will be linked to PackID in tbl_EM_ReportPackages.
    - The PackID is the primary key. That would allow only one record per PackID in the details table. Instead, make the combination of PackID and ReportID the primary key.

  5. #5
    3 Star Lounger
    Join Date
    Sep 2002
    Location
    London, England
    Posts
    294
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: You can't assign a value to this object (2000)

    Drat! Of course!
    After changing the my mind about how I was going to create this part of the database, I created two tables from one original, and of course forgot to change the field types and PKs. Maybe I'll have one less glass of 'refreshment' when I get home this evening. Thanks again.

    Ian

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •