Results 1 to 8 of 8
  1. #1
    davibus is offline Novice
    Windows 8 Access 2013
    Join Date
    Jul 2014
    Posts
    5

    Subform not updating table

    I have a form that contains 5 fields from the unit_inventory table (unit number, company, serial, availability, and notes). And then have a subform inside a tab container. The subform is based on the specs table.



    Here is a screenshot.

    Click image for larger version. 

Name:	Untitled picture.png 
Views:	9 
Size:	85.2 KB 
ID:	17592

    I fill out the form on the top and then move down to the specs subform. The unit number carries over just fine. But when I enter all the information in the subform, the fields aren't updated in the specs table. They are added to a subset in the unit_inventory table. (see screenshot below)

    Click image for larger version. 

Name:	Untitled picture.png 
Views:	9 
Size:	85.2 KB 
ID:	17593

    This is what the specs table is showing (nothing)

    Click image for larger version. 

Name:	Untitled picture.png 
Views:	9 
Size:	85.2 KB 
ID:	17593


    Here is a screenshot of my relationships:

    Click image for larger version. 

Name:	Untitled picture.png 
Views:	9 
Size:	85.2 KB 
ID:	17595



    I know this is probably a simple fix but I cannot seem to be able to figure it out.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Not sure what you mean by 'added to a subset in the unit_inventory table'.

    Are you sure the subform controls are bound to correct fields? Are the Master/Child links properly set?

    If you want to provide db for analysis, follow instructions at bottom of my post.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    davibus is offline Novice
    Windows 8 Access 2013
    Join Date
    Jul 2014
    Posts
    5
    I can't get the database file less than 2mb (it's 3mb). Here is a link to the file on my google drive: https://drive.google.com/file/d/0B8U...it?usp=sharing Thanks!!

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Zip file would be only 1MB. 2MB zip file allowed.

    Advise no spaces or special characters/punctuation (underscore is exception) in naming convention. Better would be UnitNum or Unit_Num.

    Each unit can have multiple spec records?

    I tested your Spec form data entry. Works just fine. New record in Specs and all fields have data.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    davibus is offline Novice
    Windows 8 Access 2013
    Join Date
    Jul 2014
    Posts
    5
    Thanks for the advice. No, not every unit can have multiple specs. That's another question I had- How do i link the two tables? Also, if i enter a unit in the unit_inventory table, it doesn't show up in the specs table unless i add something to the specs. I'm trying to get all the unit#'s to show up in the specs table whether we have input the specs or not. What do I need to change?

    Thanks again.

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Have to create records in the specs table. Why would you want empty records in table and on form?

    A query can join the tables and show a record for each unit even if there are no specs. This is an OUTER join. This could be useful for a report.

    You said not every unit can have multiple specs - so this means SOME units will have multiple specs?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #7
    davibus is offline Novice
    Windows 8 Access 2013
    Join Date
    Jul 2014
    Posts
    5
    Thanks, you're awesome.

    I will try to create the query you're talking about.

    No unit can have multiple specs. I guess I separated them (the unit_inventory table and the specs table) because I figured not all the information was related to each other completely. We're a dealership. So we buy a large piece of equipment and assign it a unit number. Every unit has specs that are specific to that unit. That unit has a customer. That unit has a location. It has sales information. Purchase information. So i separated all those tables. Specs was separated as well.

    Should I combine the unit_inventory table with the specs table or how should I related them?

    Thanks,

  8. #8
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    If tables have 1 to 1 relationship and there will always be related records in both tables, could just be one table.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Replies: 12
    Last Post: 01-05-2013, 06:51 PM
  2. Updating Subform Value in a Table
    By ssashraf in forum Programming
    Replies: 1
    Last Post: 12-17-2012, 02:37 PM
  3. Updating Subform Value in a Table
    By ssashraf in forum Forms
    Replies: 2
    Last Post: 12-16-2012, 12:29 AM
  4. Replies: 1
    Last Post: 11-07-2012, 05:31 PM
  5. Replies: 3
    Last Post: 11-04-2012, 09:25 AM

Tags for this Thread

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