Results 1 to 10 of 10
  1. #1
    shani908 is offline Novice
    Windows 11 Access 2019
    Join Date
    Feb 2023
    Posts
    24

    Access Template generating multiple records

    Hello .

    I am trying to customer this template for my need. There is something that I need to fix and I cannot figure out how .

    Every time I create a new "Public Notice List" Entry , it creates multiple records in "PubOwnerT" table .

    Please advise solution and why is this happening.

    Please check attachment for Template.

    Thanks


    Details of the functionality and relationship is as follows :

    1) Data Entry starts from the form name "Public Notice List"
    2) Click on "New Public Notice" to add new entry.
    3) fill the form, Field "Owner Name" is a combo box, whenever I add and save an entry It generates multiple records.

    Table are as follows :
    1) "Companies" : One company can have many agents .
    2) "Agents": One agent can be marketing many Properties .
    3) "PubOwnerT" : One Owner can have many properties.
    4) "Properties" : Details about each property and its Publication information.
    Attached Thumbnails Attached Thumbnails multiple-PubOwnerT_records.jpg   Relationship_details.jpg  
    Attached Files Attached Files

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    I am not able to open the template file. Provide your working file.
    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
    shani908 is offline Novice
    Windows 11 Access 2019
    Join Date
    Feb 2023
    Posts
    24
    Quote Originally Posted by June7 View Post
    I am not able to open the template file. Provide your working file.

    Its Accdt format. I am on access 2021.

    Can you please explain how to export for Access 2010 ?

    Thanks

  4. #4
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,822
    Hi

    It only creates 1 New Record when I create a new "Public Notice List" Entry and it also only adds 1 Record to the table "PubOwnerT"

    Db attached in Accdb Format
    Attached Files Attached Files

  5. #5
    moke123's Avatar
    moke123 is online now Me.Dirty=True
    Windows 11 Office 365
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,879
    Accdt is a template file. You need to save it as an accdb file.
    If this helped, please click the star * at the bottom left and add to my reputation- Thanks

  6. #6
    shani908 is offline Novice
    Windows 11 Access 2019
    Join Date
    Feb 2023
    Posts
    24
    okey just attached.

    Quote Originally Posted by moke123 View Post
    Accdt is a template file. You need to save it as an accdb file.
    Attached Files Attached Files

  7. #7
    shani908 is offline Novice
    Windows 11 Access 2019
    Join Date
    Feb 2023
    Posts
    24
    I just used the COntact_Management template. Create one record and it generated two entried in "PubOwnerT" table and a Singe entry in "Public Notices" Table. ):
    Attached Thumbnails Attached Thumbnails pubownerT.jpg  

  8. #8
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,822
    The structure of your Property Details Form is wrong.

    It should be bound to the 1 table named "Public Notices", not the 3 tables that you currently have

  9. #9
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    I know it is accdt. I have used accdt before and no problems creating accdb. The error indicates issue is due to creation with later version of Access. Can't create accdb. Working version posted opens just fine.

    I tried input to PublicNotices form and it fails with error "need record in Agent". There is no way to select an agent via form. Form RecordSource should not include Agents table. Similar to what mike60 advised about PropertyDetails, and I agree. Don't complicate RecordSource unless absolutely have to. Why is PubOwnerID field in query 7 times?

    If you want to display related info from lookup tables, include fields as columns in combobox then expression in textbox can reference combobox column index, index begins with 0:
    =cboAgent.Column(2)
    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.

  10. #10
    shani908 is offline Novice
    Windows 11 Access 2019
    Join Date
    Feb 2023
    Posts
    24
    Quote Originally Posted by June7 View Post
    I know it is accdt. I have used accdt before and no problems creating accdb. The error indicates issue is due to creation with later version of Access. Can't create accdb. Working version posted opens just fine.

    I tried input to PublicNotices form and it fails with error "need record in Agent". There is no way to select an agent via form. Form RecordSource should not include Agents table. Similar to what mike60 advised about PropertyDetails, and I agree. Don't complicate RecordSource unless absolutely have to. Why is PubOwnerID field in query 7 times?

    If you want to display related info from lookup tables, include fields as columns in combobox then expression in textbox can reference combobox column index, index begins with 0:
    =cboAgent.Column(2)


    Thanks . noted

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

Similar Threads

  1. Replies: 3
    Last Post: 07-17-2018, 10:06 PM
  2. Generating email with template
    By MTSPEER in forum Programming
    Replies: 7
    Last Post: 08-29-2017, 09:49 AM
  3. generating a report from multiple queries
    By DianneBeck in forum Reports
    Replies: 3
    Last Post: 05-31-2015, 08:53 AM
  4. Replies: 4
    Last Post: 08-21-2013, 08:20 AM
  5. Replies: 15
    Last Post: 07-05-2013, 10:44 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