Results 1 to 5 of 5
  1. #1
    Bilakos93 is offline Novice
    Windows 10 Office 365
    Join Date
    Aug 2023
    Posts
    12

    Forms creating new entry where it shouldn't

    Hi all

    A straightforward one I'm hoping...
    I have a many to many relationship (TblStudents, TblTeams, TblStudentsToTeams). Students can be at 2 or more different teams and the teams can have 2 or more students.
    I have created a form (where the user can navigate between the teams using a combobox and the arrows) containing a subform where they can view the members of each team.
    When I want to create a new team, I can do that easily using the main form.


    My problem is: when I am trying to add a student to a given team (using the subform) it creates a whole new team instead of using the existing one (there can't be spelling errors as I'm using a combobox). Any ideas??

    Thanks in advance

  2. #2
    davegri's Avatar
    davegri is online now Excess Access
    Windows 11 Access 2019
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,413

  3. #3
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,940
    Is the form bound?
    Show the code?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  4. #4
    Bilakos93 is offline Novice
    Windows 10 Office 365
    Join Date
    Aug 2023
    Posts
    12
    I'm actually attaching the file
    After fiddling around a bit I get the error message you'll see

    Thank you

    db.zip

  5. #5
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,566
    Hi

    Study the relationships and frmTeams in the attached
    Attached Files Attached Files
    You can PM me if you need further help.
    Good Reading https://docs.microsoft.com/en-gb/off...on-description

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

Similar Threads

  1. Replies: 3
    Last Post: 01-11-2018, 08:48 AM
  2. Replies: 2
    Last Post: 11-05-2014, 09:16 AM
  3. Replies: 1
    Last Post: 08-28-2013, 06:49 AM
  4. Error 3101 (but it shouldn't?..)
    By opopanax666 in forum Programming
    Replies: 4
    Last Post: 12-09-2010, 09:07 AM
  5. Replies: 0
    Last Post: 04-26-2008, 09:59 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