Results 1 to 3 of 3
  1. #1
    smg is offline Competent Performer
    Windows XP Access 2010 64bit
    Join Date
    Apr 2019
    Posts
    121

    Subform populating table with everything but the linked field to main form

    I have a form and subform on the attached, called frmAssessment and frmBehaviorsSubform. Assessment Detail is the table in question. It's data comes from the subform form. It feeds all the data to the Assessment Detail table except for the Assessment No. See Assessment Detail table IDs 190-192, they are blank but should have Assessment No 17. Because of this, when you go back to the form to view records, record 17 only shows the main form info and not the info that was entered when the form was filled out. This was working when the form was created and through the first 16 records input. Not sure what I did that broke it. Main form info is in Assessment Table and Summary table. Db attached.
    Attached Files Attached Files

  2. #2
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    Assessment No is not included in the Query your Subform is based on...hence it can't be passed on to the underlying Table.

    Presumably the data in the Table that includes Assessment No was entered in some way other than using the Subform...or the Subform's Query has been changed.

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  3. #3
    smg is offline Competent Performer
    Windows XP Access 2010 64bit
    Join Date
    Apr 2019
    Posts
    121
    added the following code to the subform and it works correctly now.
    If Me.NewRecord Then
    Me.Assessment_No = Me.Parent.[Assessment No]
    End If

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

Similar Threads

  1. Replies: 5
    Last Post: 02-12-2014, 11:52 PM
  2. Replies: 3
    Last Post: 11-04-2012, 09:25 AM
  3. Replies: 12
    Last Post: 01-18-2012, 10:02 AM
  4. Populating identity field of an over-ODBC linked MSSQL table
    By Passiday in forum Import/Export Data
    Replies: 0
    Last Post: 11-16-2011, 11:49 AM
  5. Replies: 3
    Last Post: 04-04-2011, 02:45 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