Problems with Access Forms

By jsuess ·
Hi! I'm a novice Access 2007 user. I'm trying to make a form to make my data easier to enter. The form is basically used to enter what employee was driving what truck on the given day, as well as a couple of other values.

I'd like my users to be able to select the employee name from a drop-down list with the values coming from the Employee table. But I would like the employeeID number (which is the
primary key for the employee table) to go into it's matching field in the "Day" table, which actually records the data about which truck was driven by which employee.

I'd like the same thing to happen for the trucks. They should be able to pick the license plate number from the list and have the primary key from that table entered into the Day table.

Can I even make this happen? I've tried, but to no avail. My original drop-down list contained all the values I wanted, but when I typed in a sample record and updated my table, the number '2' appeared in the first name field on my Employee table, not the Day table!

Could someone explain to me how to do this, but in the simplest terms possible? Access is making me into an idiot...

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Answers

Collapse -

Search for Master - Detail in the Help

by Tony Hopkinson In reply to Problems with Access Form ...

T'is all in there.

Collapse -

Can't find it....

by jsuess In reply to Search for Master - Detai ...

Well, I searched "master - detail", I found some nice articles, but I read all of them and didn't find my answer. Is there some search result in particular I'm supposed to be looking for? Or did I interpret that answer wrong?

Collapse -

Hmm , Employees as Master

by Tony Hopkinson In reply to Can't find it....

Day's as Detail, would do the job.
Establishing the master detail relationship, (on employee_id) would pop the link in automatically.
If you want more control than that, Access wise I'm not the best guy to answer.
If I was doing it.
I'd populate the combo from a query on employees, test the name value the id,
On select if in (add mode) then I'd force an insert on days and set the employeeid and then go from there.

The other thing you might want to look up is lookup lists.

There you have the combo box in the Days record, it would display employee names nut put the id's in the table.

Collapse -

I got it!

by jsuess In reply to Hmm , Employees as Master

I got it now, thanks so much!!

Related Discussions

Related Forums