Solved Form Combo Box creates a new record in it's source table?

WhiskyGeek

New member
Local time
Today, 12:39
Joined
Apr 1, 2020
Messages
3
Hello,

I haven't made an MS Access database since highschool so I'm certain this is something simple and I'm just being dense, but I'm stumped so your help is appreciated!

I'm trying to create a simple (Access 2007) database to log companies, contacts and attempted approaches/contact with them.

I've got 4 tables:

Untitled.jpg


Idea being that you create a company, which can have several contacts. We allocate an employee to focus on trying to develop business with that contact. Each appoach/contact is logged so we can track progress and shift focus' if necessary.

Here's my issue; I've created a form for creating a contact record. The Company ID and Employee ID are entered via a Combo Box which pulls up the 'Company' and 'Employee name' fields respectively. The form appears to work as you'd expect and you can fill it all out fine, upon saving & closing the form a new record is created in the companies table with new autonumber PK, the company name has been filled with the PK of the record you selected from the Combo Box. Same thing with the employee ID/table.

Untitled 2.jpg


Untitled 3.jpg


(Entering 'example 1' from the Combo Box resulted in a new company being created, ID 21 with the Company field filled with the ID of 'example 1')

I'm not sure what I've done to make this happen and can't figure out how to stop it. Any help would great 👍
 
HI. Welcome to AWF! Are you using any code in your form?
 
Hi theDBguy,

Not knowingly, I've created the form using the wizards, Access ribbons and "Add Existing Fields". I'm not intentionally trying to do anything advanced.

Untitled 4.jpg
 
Hi theDBguy,

Not knowingly, I've created the form using the wizards, Access ribbons and "Add Existing Fields". I'm not intentionally trying to do anything advanced.

View attachment 80456
Would you mind posting a demo version of your db for testing? It might help find the problem sooner.
 

Users who are viewing this thread

Back
Top Bottom