Autofill From Combo Box In Form Not Populating Table (1 Viewer)

Zachar1ah

New member
Local time
Today, 07:27
Joined
Aug 30, 2023
Messages
1
Hello Everyone,

I am pretty new to access so bear with me. I am helping a co-worker with an Access form we want to distribute to others.

In our form, we have two combo boxes that when a selection is chosen, it automatically fills another field out. For example, choosing your name in the "Employee Name" field automatically fills in the "Emp ID' field with your employee ID associated. Vice versa with the Part Number box to the PartDescription field.

1693418437080.png


1693418633043.png


The issue is that every other field (which for context is not auto-filled by anything) is populated to our chosen table (JobHours), except for the "Emp ID" and "Part Description" (Both of these are the auto-populated fields for the drop-down combo boxes). It fills into the form boxes fine, but does not flow to the table for whatever reason. Here are the relationships between these tables:

1693418983987.png

For added context, our database is split with the front-end forms populating data to a back-end stored elsewhere

If I am missing any important info about the tables and such, please let me know and I will provide them as needed. I'm pretty stumped as to why those two fields refuse to flow as needed, I'm hoping it is just a dumb/simple mistake right in front of my eyes.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 07:27
Joined
Feb 19, 2002
Messages
43,275
In a relational database, the connection between related tables is PK (primary key) to FK (foreign key). The ONLY column that ever appears in a child table is the FK. NO other data from the parent table is ever duplicated in the child table.

Take a look at this example

 

mike60smart

Registered User.
Local time
Today, 12:27
Joined
Aug 6, 2017
Messages
1,905
Hello Everyone,

I am pretty new to access so bear with me. I am helping a co-worker with an Access form we want to distribute to others.

In our form, we have two combo boxes that when a selection is chosen, it automatically fills another field out. For example, choosing your name in the "Employee Name" field automatically fills in the "Emp ID' field with your employee ID associated. Vice versa with the Part Number box to the PartDescription field.

View attachment 109651

View attachment 109653

The issue is that every other field (which for context is not auto-filled by anything) is populated to our chosen table (JobHours), except for the "Emp ID" and "Part Description" (Both of these are the auto-populated fields for the drop-down combo boxes). It fills into the form boxes fine, but does not flow to the table for whatever reason. Here are the relationships between these tables:

View attachment 109654
For added context, our database is split with the front-end forms populating data to a back-end stored elsewhere

If I am missing any important info about the tables and such, please let me know and I will provide them as needed. I'm pretty stumped as to why those two fields refuse to flow as needed, I'm hoping it is just a dumb/simple mistake right in front of my eyes.
Can you upload a zipped copy of the database with no Confidential Data?
 

Users who are viewing this thread

Top Bottom