G
Guest
I have three tables defined at follows:
tblStore:
Primary Key: lngStoreID AutoNumber
strStoreName Text
tblManager:
Primary Key: lngManagerID AutoNumber
lngStoreID Number
strManagerName Text
tblEmployee:
Primary Key: lngEmployeeID AutoNumber
lngManagerID Number
strEmployeeName Text
I have 3 combo boxes, cboStore, cboManager, and cboEmployee
The AfterUpdate for cboStore is as follows and and the store picked is used
to filter the managers name that will display in cboManager
Private Sub cboStore_AfterUpdate()
Dim sManagerSource As String
sManagerSource = "SELECT [tblManager].[lngManagerID],
[tblManager].[lngStoreID], [tblManager].[strManagerName] " & _
"FROM tblManager " & _
"WHERE [lngStoreID] = " & Me.cboStore.Value
Me.cboManager.RowSource = sManagerSource
Me.cboManager.Requery
End Sub
The AfterUpdate for cboManager is as follows and the manager name picked is
used to filter the employee name that will display in cboEmployee
Private Sub cboManager_AfterUpdate()
Dim sEmployeeSource As String
sEmployeeSource = "SELECT
[tblEmployee].[lngEmployeeID],[tblEmployee].[lngManagerID],
[tblEmployee].[strEmployeeName] " & _
"FROM tblEmployee " & _
"WHERE [lngManagerID] = " & Me.cboManager.Value
Me.cboEmployee.RowSource = sEmployeeSource
Me.cboEmployee.Requery
End Sub
The cboStore displays the strStoreName (Text), the cboManger displays the
strManagerName (Text) based on the store picked, but the cboEmployee displays
the lngMangaerID (Number) instead of the strEmployeeName (Text)…. What’s
wrong??? Thanks….Joe…
tblStore:
Primary Key: lngStoreID AutoNumber
strStoreName Text
tblManager:
Primary Key: lngManagerID AutoNumber
lngStoreID Number
strManagerName Text
tblEmployee:
Primary Key: lngEmployeeID AutoNumber
lngManagerID Number
strEmployeeName Text
I have 3 combo boxes, cboStore, cboManager, and cboEmployee
The AfterUpdate for cboStore is as follows and and the store picked is used
to filter the managers name that will display in cboManager
Private Sub cboStore_AfterUpdate()
Dim sManagerSource As String
sManagerSource = "SELECT [tblManager].[lngManagerID],
[tblManager].[lngStoreID], [tblManager].[strManagerName] " & _
"FROM tblManager " & _
"WHERE [lngStoreID] = " & Me.cboStore.Value
Me.cboManager.RowSource = sManagerSource
Me.cboManager.Requery
End Sub
The AfterUpdate for cboManager is as follows and the manager name picked is
used to filter the employee name that will display in cboEmployee
Private Sub cboManager_AfterUpdate()
Dim sEmployeeSource As String
sEmployeeSource = "SELECT
[tblEmployee].[lngEmployeeID],[tblEmployee].[lngManagerID],
[tblEmployee].[strEmployeeName] " & _
"FROM tblEmployee " & _
"WHERE [lngManagerID] = " & Me.cboManager.Value
Me.cboEmployee.RowSource = sEmployeeSource
Me.cboEmployee.Requery
End Sub
The cboStore displays the strStoreName (Text), the cboManger displays the
strManagerName (Text) based on the store picked, but the cboEmployee displays
the lngMangaerID (Number) instead of the strEmployeeName (Text)…. What’s
wrong??? Thanks….Joe…