Results 1 to 3 of 3
  1. #1
    d9pierce1 is offline Expert
    Windows 10 Access 2016
    Join Date
    Jan 2012
    Location
    Oklahoma
    Posts
    776

    Record being doubled in table?


    HI all,
    I attached a sample DB from my actual as so I could figure out why this controls afterupdate event is adding two records for each entry. I have spent most of last night on it and this morning and cannot figure out at all. The real kicker is i have this code in another database and it works just fine.

    Why is this doubling my records? db will open to CompanyFrm, then open CompanyLocationFrm and enter some info, dont worry about data. Then open up Company2LocationTbl and you will see it put two records in it.
    Please assist
    Thanks
    DaveDBMeProfile.zip

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    Why does CompanyLocationID field in Company2LocationTbl have a description of "From LocationTypeTbl" shouldn't that be "From CompanyLocationTbl"

    Company2LocationQry is used as form RecordSource. When data is entered in form, a record is created in both tables because of links in query then code creates another record. Don't use query as RecordSource, just use CompanyLocationTbl.

    As a general rule, a form should do data entry/edit for 1 table.

    Use form/subform arrangement for multi-table input or use unbound forms/controls and code.

    Not really understanding purpose of two location tables.


    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
    d9pierce1 is offline Expert
    Windows 10 Access 2016
    Join Date
    Jan 2012
    Location
    Oklahoma
    Posts
    776
    Thanks June7
    I found the issue. Actually there were two of them but got it fixed. I tore this db apart ....Now i get to put it back together with the fixes....
    Thanks
    Dave

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

Similar Threads

  1. Replies: 1
    Last Post: 12-11-2018, 01:24 PM
  2. Replies: 2
    Last Post: 09-25-2018, 05:33 PM
  3. Replies: 3
    Last Post: 08-09-2012, 01:49 PM
  4. Doubled records in a form
    By kmw in forum Forms
    Replies: 1
    Last Post: 05-09-2012, 10:23 AM
  5. DB doubled in size after import into new DB
    By rcrobman in forum Programming
    Replies: 4
    Last Post: 04-30-2011, 02:25 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