Gregof1976
Registered User.
- Local time
- Today, 03:41
- Joined
- Mar 28, 2011
- Messages
- 44
Welcome
The code below filters the list box depending on the selected option 1, 2, 3, 4, 5
Unfortunately, after filtration in the list box is visible only EmployeeID, and I would like to see surname as well.
WybPrac.RowSource = "Select Prac.IDemploy" & _
I tried to modify the code in this way, but unfortunately it does not work (
WybPrac.RowSource = "Select Prac.IDemploy, Prac.Surname" & _
Can anyone hint on how to modify the code below?
Private Sub grpFirma_AfterUpdate()
On Error Resume Next
Dim strFirm As String
Select Case grpFirm.Value
Case 1
strFirm = "Ne"
Case 2
strFirm = "La"
Case 3
strFirm = "Re"
Case 4
strFirm = "In"
Case 5
strFirm = "Al"
End Select
WybPrac.RowSource = "Select Prac.IDemploy " & _
"FROM Prac " & _
"WHERE Prac.Firm = '" & strFirm & "' " & _
"ORDER BY Prac.Surname;"
End Sub
The code below filters the list box depending on the selected option 1, 2, 3, 4, 5
Unfortunately, after filtration in the list box is visible only EmployeeID, and I would like to see surname as well.
WybPrac.RowSource = "Select Prac.IDemploy" & _
I tried to modify the code in this way, but unfortunately it does not work (
WybPrac.RowSource = "Select Prac.IDemploy, Prac.Surname" & _
Can anyone hint on how to modify the code below?
Private Sub grpFirma_AfterUpdate()
On Error Resume Next
Dim strFirm As String
Select Case grpFirm.Value
Case 1
strFirm = "Ne"
Case 2
strFirm = "La"
Case 3
strFirm = "Re"
Case 4
strFirm = "In"
Case 5
strFirm = "Al"
End Select
WybPrac.RowSource = "Select Prac.IDemploy " & _
"FROM Prac " & _
"WHERE Prac.Firm = '" & strFirm & "' " & _
"ORDER BY Prac.Surname;"
End Sub