Results 1 to 3 of 3
  1. #1
    johnv is offline Novice
    Windows 10 Access 2016
    Join Date
    Feb 2019
    Posts
    10

    Subform not updating table to match mainform ID

    I am pretty new to access and I have a database that I am trying to make which uses a main table (Rooms_Table) where every record is a room. This table is being fed by "Rooms_Mainform". I have embedded a few sub forms into this mainform which has notes associated with each room to create a one to many relationship. I have linked the two forms in the relationship panel (Mainform ID to the Record # column and changed the control source for the record # column to match the ID number on the mainform. When I open the mainform and try to create a new record in the subform, the Record# box shows correctly but when I save the record and view it in the table, the Record # cell defaults to "1" which is the default value for that column.
    Attached Thumbnails Attached Thumbnails Mainform.PNG   FurnitureBySpace_Table.PNG  
    Attached Files Attached Files

  2. #2
    ranman256's Avatar
    ranman256 is online now VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    1. its usu best to match field names to both tables , i.e.
    Rooms_Table.TableID and tSpace.TableID.
    using the generic ID does not clarify what it is.

    2. if the master table key is tMaster.ID
    then the subtable ID must be bound to it in the subform property:
    LINK MASTER FIELD: tMaster.ID
    LINK CHILD FIELD: tSubTbl.ID

    this will insert the child table ID values as you enter data.

  3. #3
    johnv is offline Novice
    Windows 10 Access 2016
    Join Date
    Feb 2019
    Posts
    10
    So I should create a different field which is unique to each room and that will identify which record it is associated with?

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

Similar Threads

  1. Replies: 1
    Last Post: 11-04-2015, 07:25 AM
  2. Replies: 1
    Last Post: 11-07-2012, 05:31 PM
  3. Replies: 4
    Last Post: 03-30-2012, 01:47 AM
  4. Replies: 1
    Last Post: 11-29-2011, 01:37 AM
  5. Replies: 1
    Last Post: 11-05-2010, 04:51 AM

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