Hi! Another question from the resident idiot. 
I'm working with a form that I'm using to edit employee data. It is built from a query which uses the following fields:
TD# (primary key, employee ID number)
Last (last name of employee)
First (first name)
PositionNo (Unique number classifying all of their job's specs.)
Thanks to RichMorrison, I was able to use a combo box that displays some of the specifications for the position (title, office, supervisor, etc). I put unbound text boxes on the form, and used an AfterUpdate event to show these specifications. The text boxes were enabled and locked so that they couldn't be changed.
Problem is, the information that is put into these fields is displayed for every record. Any idea why this is/how to fix it?
Here is my code:
Private Sub PositionNo_AfterUpdate()
Me!title1 = Me![PositionNo].Column(1)
Me!CostCenter1 = Me![PositionNo].Column(2)
Me!Office1 = Me![PositionNo].Column(3)
Me!Supervisor1 = Me![PositionNo].Column(4)
End Sub
Thanks in advance.
(By the way, I'm not good at code, so you may have to use short, simple words.)
--Sara
I'm working with a form that I'm using to edit employee data. It is built from a query which uses the following fields:
TD# (primary key, employee ID number)
Last (last name of employee)
First (first name)
PositionNo (Unique number classifying all of their job's specs.)
Thanks to RichMorrison, I was able to use a combo box that displays some of the specifications for the position (title, office, supervisor, etc). I put unbound text boxes on the form, and used an AfterUpdate event to show these specifications. The text boxes were enabled and locked so that they couldn't be changed.
Problem is, the information that is put into these fields is displayed for every record. Any idea why this is/how to fix it?
Here is my code:
Private Sub PositionNo_AfterUpdate()
Me!title1 = Me![PositionNo].Column(1)
Me!CostCenter1 = Me![PositionNo].Column(2)
Me!Office1 = Me![PositionNo].Column(3)
Me!Supervisor1 = Me![PositionNo].Column(4)
End Sub
Thanks in advance.
(By the way, I'm not good at code, so you may have to use short, simple words.)
--Sara