Results 1 to 5 of 5
  1. #1
    richard1941 is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2014
    Posts
    10

    How do I NOT overwrite data in a table in Access 2010?

    I have a form that has 2 combo boxes and a list box. As I select items from each of the lists, the lists get changed. I tried setting some queries to Snapshot, but then I couldn't select from the list.



    Alternatively, How can I find out where or why the data is being overwritten?

    Thanks for your help.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    The form RecordSource and data controls ControlSource properties determine where data input goes to.

    If the table that is source for the list is changed then you probably have the table included in the form RecordSource and the combobox is bound to the wrong field.

    If you don't want data overwritten in the destination table, then move to new record row and create new record.

    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
    richard1941 is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2014
    Posts
    10

    More on corrupt data

    I have attached a copy of my database. The form that is causing trouble is frmIdentifySubOrganization. The tables involved are tblOrganizations, LUtblTypeOfSubOrg, and tblOrgSubOrg. Both tblOrganizations, and LUtblTypeOfSubOrg get corrupted frequently.
    Attached Files Attached Files

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,722
    Do yourself and readers a favor --name your ID fields with meaningful names within the Tables. You have too many ID fields that are confusing. Use things like RoleID, not just ID.
    In your junction tables (removing the M:M relationships) you do not need both an ID and all FK to make a unique record. Either use all FK or use the separate ID PK and a unique composite index of the fields representing FK (to prevent duplicates).
    You might consider a tblSubOrgType --seems to be missing.

    Good luck.

  5. #5
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    Think the table exists, called LUtblTypeOfSubOrg.

    Instead of the listbox pulling from a query object, just make the SQL statement pull from the table.
    SELECT [LUtblTypeOfSubOrg].[TypeOfSubOrg] FROM LUtblTypeOfSubOrg ORDER BY TypeOfSubOrg;

    That form/subforms makes no sense. Why do you have the main form bound to LUtblTypeOfSubOrg and the listbox RowSource is the same? And the listbox is bound to TypeOfSubOrg. Of course selecting an item from the listbox will change the record.

    Then the subforms are not linked to the main form and have no reason to be. Also, the two subforms are bound to the same data.

    This is not the way to build forms for data entry.

    Suggest you study some more tutorials on relational database concepts and Access functionality. Maybe this will help http://www.rogersaccesslibrary.com/
    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. How to not overwrite data in a field.
    By Bestieboy in forum Access
    Replies: 7
    Last Post: 03-28-2013, 10:49 PM
  2. Replies: 3
    Last Post: 12-14-2012, 11:26 AM
  3. Replies: 12
    Last Post: 10-15-2012, 08:07 AM
  4. Corrupt Table in Data Set View Access 2010
    By Peter Murray in forum Access
    Replies: 1
    Last Post: 11-29-2010, 04:16 PM
  5. Table Overwrite
    By ml2009 in forum Access
    Replies: 3
    Last Post: 01-14-2010, 07:06 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