Change value based on combobox not working


T

TitaniaTiO2

Something is not right with my query or relationships....

Background:
I have the following tables/queries:

tblDepartment
DepartmentID
Department

tblPerson
PersonID
LastName
FirstName
JobTitle
EmploymentStatus

tblEmployment
PersonID
DepartmentID

qryEditEmployeeInfo
LastName
FirstName
JobTitle
EmploymentStatus
Department
DepartmentID
PersonID
Expr1 ([LastName]&", "&[FirstName])


I want a form where I can use a combo box to select an employee's name
(based on expr1) and populate editable text boxes with the corresponding
JobTitle, EmploymentStatus and Department. This is to allow the user to
update the information (just as a JobTitle change)

So far I have that working.

I want the user to be able to change the department (if listed in wrong
department or transferred). I would like to have the current department be
displayed, but the user be able to change this department. I tried to make
the department text box be a combo box.

Problem - When I try to select a different department, it modifies the
Department value in tblDepartment not the DepartmentID in tblEmployment.

Any suggestions on how I fix this?

Thanks!

Titania
 
Ad

Advertisements

G

Golfinray

Put a combo box on your form. Allow the wizard to set it up for you and
select the expr as its source. Right click on the combo, go to events, and on
the afterupdate event start the code builder (little button to the right.)
Then type:
Me.filter = "[expr] = """ & me.combo# & """"
Me.filteron - true

Your combo number, like combo 10 or combo22 will be displayed there for you.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top