Help filtering form based on the data from another table

Hope you never have a lot of rows in this table since you are dead set on using the worst method.
 
Hope you never have a lot of rows in this table since you are dead set on using the worst method.
I know what you're saying and I'm working on it. This is a temporary fix. The core issue is that I don't have a full listing of all employees in a table. Powers that be have not allowed that yet. So I can't make a junction table between complaints and employees because the employees table doesn't exist
 
@arnelgp One quick question. I've attached your sample DB with a slight change.

If I wanted the search form to also allow for the user to input a date range, how would you suggest building the code for that with your existing code?

Thanks!!
 

Attachments

see your search form (also the code behind the search button).
 

Attachments

@arnelgp awesome! Thank you! Last question, I swear. Let's say I also wanted a 'complaint number' search field in that search form. How would you add that in the code?

I tried adding the below code in but I'm getting an 3075 error.
Code:
If Not IsNull(Me.txtComplaintCategory) Then
     sFilter = sFilter & "[ComplaintCategory] ='" & Me.txtComplaintCategory & "'"
End If
 

Attachments

Last edited:

Users who are viewing this thread

Back
Top Bottom