Methodikal
New member
- Local time
- Yesterday, 20:14
- Joined
- Nov 7, 2022
- Messages
- 17
Greetings,
New Problemo. I have a combobox that pulls in the Supervisor name and filters the results in the form by the Supervisor Position ID.
However, when I click on some options it takes me to a different Supervisor (Supervisor Position ID). Then when I try to switch to another Supervisor in the combobox it doesn't change and does not Requery.
Here is my VBA Code:
AllEmployeesEditableF
Option Compare Database
Option Explicit
_______________________________________
Private Sub SupervisorSearchCbo_AfterUpdate()
RequeryFormAllEmployeesEditableF
End Sub
_______________________________________
Sub RequeryFormAllEmployeesEditableF()
Dim strSQL As String
strSQL = ""
If Len("" & Me.!SupervisorSearchCbo3) > 0 Then
strSQL = "[ReportsToFull] = '" & Me.!SupervisorSearchCbo3 & "'"
End If
If Len(strSQL) = 0 Then
Me.FilterOn = False
Else
Me.Filter = strSQL
Me.FilterOn = True
End If
End Sub
________________________________________
Private Sub SupervisorSearchCbo3_AfterUpdate()
RequeryFormAllEmployeesEditableF
End Sub
_________________________________________
Any advice is much appreciated.
Thanks,
Methodikal
New Problemo. I have a combobox that pulls in the Supervisor name and filters the results in the form by the Supervisor Position ID.
However, when I click on some options it takes me to a different Supervisor (Supervisor Position ID). Then when I try to switch to another Supervisor in the combobox it doesn't change and does not Requery.
Here is my VBA Code:
AllEmployeesEditableF
Option Compare Database
Option Explicit
_______________________________________
Private Sub SupervisorSearchCbo_AfterUpdate()
RequeryFormAllEmployeesEditableF
End Sub
_______________________________________
Sub RequeryFormAllEmployeesEditableF()
Dim strSQL As String
strSQL = ""
If Len("" & Me.!SupervisorSearchCbo3) > 0 Then
strSQL = "[ReportsToFull] = '" & Me.!SupervisorSearchCbo3 & "'"
End If
If Len(strSQL) = 0 Then
Me.FilterOn = False
Else
Me.Filter = strSQL
Me.FilterOn = True
End If
End Sub
________________________________________
Private Sub SupervisorSearchCbo3_AfterUpdate()
RequeryFormAllEmployeesEditableF
End Sub
_________________________________________
Any advice is much appreciated.
Thanks,
Methodikal