I am creating a form with fields that auto populate. I've read numerous postings and threads, but can't get it to populate with accurate data.
[Instructor]
[LineNumber]
[Status]
Private Sub cmbInstructor_AfterUpdate()
'Initialize LineNumber and Status or each Instructor change'
If Not IsNull (Me![cmbInstructor]) Then
Me![cmbLineNumber] = (Me![cmbInstructor])
Me![cmbStatus] = (Me![cmbInstructor])
The Instructor field is populated using a qry...
SELECT [ID], [Instructor] FROM qryInstructorsExtended ORDER BY [Instructor];
The LineNumber field is populated using a qry...
SELECT [ID], [LineNumber] FROM qryLineNumberExtended ORDER BY [LineNumber];
The Status field is populated using this qry...
SELECT [Duty Status_ID] FROM tblInstructors GROUP BY [Duty Status_ID] ORDER BY [Duty Status_ID]
The values from the cmbStatus field when I run the query return the correct data (Active, Leave, Retired etc.)...but when I look at the values based on the cmbStatus dropdown in form view it reads, 1, 2, 3, 4... I am assuming it is reading based on my Lookup to the tblDutyStatus from the tblInstructors.
When I change my cmbInstructor, the cmbLineNumber populates correctly, but the cmbStatus does not populate with the correct data. It populates with the [ID] field for each Instructor.
Please help me resolve this issue. I greatly appreciate the work you guys/gals do. I love this forum.