Hello- I have a database that is used for quality reviews. When functioning properly the user should be able to select from 3 comboboxes and the form will populate with records based on the selection.
The problem: The database has been used for 2 months with no issues but now the filter options are not displaying the data in the form. There are 3 comboboxes that the user selects in order to provide them with a record to review.
cboStatus (Pending Review or Completed)
cboEmployee(selects from a list of employees)
cboQuarter (Q1, Q2, Q3, Q4)
When these options are selected the form should fill in some details from the table. When you choose “Completed”, select an Employee, and select either Q1 or Q2 the filters are working and the form fills in with the completed audits based on the selections but when you choose “Pending Review” and select the other filter options the fields on the form that should fill in “flash” like they are going to show records but then it goes away and the fields are left blank.
I have put in msgboxes before the ‘Select Case Me.cboStatus.Value’ and the ‘Select Case Me.cboQuarter.Value’ and cboEmployee to see what responses I am getting in hopes of narrowing down the issue but the msgboxes show exactly as the filters are selected.
I have also tried removing the VBA completely, putting it in a txt file and then putting it back in with the thought that maybe something was corrupt in my code. No change.
I am sort of at a loss now. This database needs to go live July 1st for the organization and I can't figure out what the heck is going on. I attached some screenshots of the Property Sheet as well as the code.
Thank you in advance for any help you can provide!Code:Option Compare Database Private Sub cboStatus_AfterUpdate() SetFilters End Sub Private Sub cboEmployee_AfterUpdate() Me.Requery MsgBox (cboEmployee.Value) End Sub Private Sub cboQuarter_AfterUpdate() SetFilters End Sub Private Sub SetFilters() Dim MyFilter MyFilter = "" Me.Filter = "" Me.FilterOn = False Select Case Me.cboStatus.Value Case "Pending Review" If MyFilter = "" Then MyFilter = "Auditor Is Null" Else MyFilter = MyFilter & " AND Auditor = ''" End If Case "Completed" If MyFilter = "" Then MyFilter = "DateAudited Is Not Null" Else MyFilter = MyFilter & " AND DateAudited Is Not Null" End If Case Else End Select Select Case Me.cboQuarter.Value Case "Q1" If MyFilter = "" Then MyFilter = "[AuditName] = 'Q1'" Else MyFilter = MyFilter & " AND [AuditName] = 'Q1'" End If Case "Q2" If MyFilter = "" Then MyFilter = "[AuditName] = 'Q2'" Else MyFilter = MyFilter & " AND [AuditName] = 'Q2'" End If Case "Q3" If MyFilter = "" Then MyFilter = "[AuditName] = 'Q3'" Else MyFilter = MyFilter & " AND [AuditName] = 'Q3'" End If Case "Q4" If MyFilter = "" Then MyFilter = "[AuditName] = 'Q4'" Else MyFilter = MyFilter & " AND [AuditName] = 'Q4'" End If End Select If Len(MyFilter) > 0 Then Me.Filter = MyFilter Me.FilterOn = True Else Me.FilterOn = False End If Me.Refresh End Sub