I have 2 Cascading Combo boxes setup and working correctly.
cbo1 lists all agents and cbo2 lists the branches that relate to each agent.
tbl_agents and tbl_branches are setup with a 1 to many relationship.
I have used the code (explained here) that allows the user to add a new agent if they are not in the list. This works correctly. Now I want to let the user add a new branch for the agent they have just added. The code appears to work correctly from the front end, but when you check tbl_branch, there is a new entry but it is missing the appropriate agentID foreign key (ie, it's not related to the new agent).
Is there something that I'm missing? I assume this is possible, but I must be doing something wrong.
Maybe I need to create a little pop-up form for data entry?
any help appreciated.
cbo1 lists all agents and cbo2 lists the branches that relate to each agent.
tbl_agents and tbl_branches are setup with a 1 to many relationship.
I have used the code (explained here) that allows the user to add a new agent if they are not in the list. This works correctly. Now I want to let the user add a new branch for the agent they have just added. The code appears to work correctly from the front end, but when you check tbl_branch, there is a new entry but it is missing the appropriate agentID foreign key (ie, it's not related to the new agent).
Is there something that I'm missing? I assume this is possible, but I must be doing something wrong.
Maybe I need to create a little pop-up form for data entry?
any help appreciated.
Last edited: