Results 1 to 14 of 14
  1. #1
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Toronto Canada
    Posts
    920
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Assign Value Error Message (A2K)

    I
    Cheers,
    Andy

  2. #2
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Assign Value Error Message (A2K)

    Hi Andy

    have you converted this database from an earlier version?

    Sometimes this error is caused by usinf . (dot) , ! (splat) and [] in the wrong places. For example gave you cheked your code for items such as this:

    Me.Parent.[LastDate] = Me.[MeetingDate]

    changed to

    Me.Parent.LastDate = Me.MeetingDate

    I have had maddening databases which I converted and the newer version did not like the formats. As well as the code have you looked at all text boxes and ensured the syntax for them is correct? I tend to use the expression builder when I have complex forms to stop me making spelling mistakes.my <img src=/S/2cents.gif border=0 alt=2cents width=15 height=15>
    Jerry

  3. #3
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Toronto Canada
    Posts
    920
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Assign Value Error Message (A2K)

    Jerry,

    Thanks for the quick reply. 'Tis food for thought. I don't think that's the problem, but I will ferret my way through what I have to see if your suggestions apply.

    Who knows what evil lurks in the hearts of databases? The Shadow should.

    Thanks again,
    Cheers,
    Andy

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

    Re: Assign Value Error Message (A2K)

    Could the error be caused by code, for example in the Before Insert event of the subform? If so, are you offered a choice to debug? If not, your code may contain a line On Error GoTo <label>. Temporarily comment out this line by inserting an apostrophe in front of it. You should then get the Debug option when the error occurs.

  5. #5
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Assign Value Error Message (A2K)

    I'd check the Master/child linking fields for the subform.

    Also, check the query behind the subform to make sure it is updatable. And check to make sure you didn't Lock the subform control on the mainform.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  6. #6
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Toronto Canada
    Posts
    920
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Assign Value Error Message (A2K)

    Mark,

    Thanks as always for keeping an eye on my sometimes dubious efforts. Even as we speak ( type? whatever ) I'm cleaning up the Master/child linkages where I discovered an "anomaly" last night.

    It's probably those evil, middle-of-the-night anti-programming wraiths again. I should be on top of this by later today or tomorrow. Or Else!

    I'll post the results.

    Cheers,
    Cheers,
    Andy

  7. #7
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Toronto Canada
    Posts
    920
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Assign Value Error Message (A2K)

    Mark,

    Just a quickie question.

    How do I "force" a new record in a subform to "immediately" setup the linkage.

    The situation is, when I do open a new record in the subform, it's sitting on "autonumber" which is the core of my problem I believe. As I mentioned, when I open this new record, I want it to setup it's linkages, possibly by just entering the first field, or putting focus on the subform. I know that when I enter the first number in the first box, I get my aforementioned Error Warnings. Don't know what the right combination is.

    Would appreciate your suggestions on this,
    Cheers,
    Andy

  8. #8
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Assign Value Error Message (A2K)

    The Autonumber is not the cause of your problem. It is just an ID field in the table behind the subform. There is another field in this table that links it to the table behind the mainform. If you have correctly maintained the Master/Child Link properties of the subform control, this linking field is automatically filled-in for you when you add a new record
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  9. #9
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Toronto Canada
    Posts
    920
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Assign Value Error Message (A2K)

    Mark,

    Obviously I
    Cheers,
    Andy

  10. #10
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Assign Value Error Message (A2K)

    I'm not sure you understand the concept of linking fields between master and subform, and perhaps between parent and child tables.

    If 2 tables have a one-to-many relationship. The primary table is the parent, and it can have multiple records in the child table. For example, one vendor can have multiple invoices. The primary key of the Vendor table is VendorID (could be an autonumber). The Invoice table has InvoiceID (also could be an autonumber) as its primary key. However, it also has a VendorID field, which is referred to as a foreign key.

    Now, when you create a Vendor form with an Invoices subform, you identify the linking fields; that is, the fields that are common to both (not necessarily by name, but by function). In this case, we've made it simple by naming the linking field the same in both tables; it is the Vendor ID.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  11. #11
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Toronto Canada
    Posts
    920
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Assign Value Error Message (A2K)

    Mark,

    This is just a note of clarification and not by any means a complaint.

    I appreciate the explanation which was well worded (see below) and deserved based on the less than clear manner in which I described what I referred to earlier as an "anomaly
    Cheers,
    Andy

  12. #12
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Assign Value Error Message (A2K)

    We see a broad range of Access experience and expertise here, so we have learned not to assume anything. And I'm glad you realized that I apparently misinterpreted or misunderstood your comments, which is why I launched into the linking explanation. And I appreciate your comments about that.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  13. #13
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Toronto Canada
    Posts
    920
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Assign Value Error Message (A2K)

    Mark,

    Based on the accurate answers that you folks provide while working with minimal explanation of the problem, I just assumed you were all mindreaders.

    Thanks kindly for responding. I really do appreciate it,
    Cheers,
    Andy

  14. #14
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Toronto Canada
    Posts
    920
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Assign Value Error Message (A2K)

    Mark,

    In 25 words or less " The Stupid Form Was Corrupted!"

    And I cannot tell you what the other 20 words were else I won't be allowed back on this Forum.

    Thanks again for all of your help,
    Cheers,
    Andy

Posting Permissions

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