I realize that there are many threads explaining this and I have tried to do it on my own!
I was wondering if someone could check out my code and help me.
It is working fine except....when I choose a "Department" it lists the "Instruments" as the DepartmentID number in the cboInstrument.
In other words, when I choose "Surgery" in the cboDepartment control and then go to cboInstrument....it only list multiple "1s" (1 is the DepartmentID)....If I choose one of the "1"s it changes to the InstrumentName (which is what I want it to display in the cbo to begin with?
Any ideas....Is this problem in the code? Or maybe something set wrong in cboInstrument?
Any help would be appreciated.
Private Sub cboDepartment_AfterUpdate()
Dim strSource As String
strSource = "SELECT [tblInstrument].[InstrumentID]," & _
" [tblInstrument].[DepartmentID]," & _
" [tblInstrument].[InstrumentName] " & _
"FROM [tblInstrument] " & _
"WHERE [DepartmentID] = " & Me.cboDepartment.Value
Me.cboInstrument.RowSource = strSource
Me.cboInstrument.Requery
End Sub