sathyaganapathi
Board Regular
- Joined
- Apr 29, 2021
- Messages
- 81
- Office Version
- 2016
- Platform
- Windows
Hi,
Could you please help to combine below two quries under one?
Both are working fine when user separately.
when try to combine them together nothing worrks.
What I want is, first query to work when date range is given.
Please help.
Could you please help to combine below two quries under one?
VBA Code:
If Me.ComboBox1.Value <> "Lab_Pending" And Me.ComboBox1.Value <> "ALL" Then
qry = "SELECT * FROM TBL_PlabInput WHERE " & Me.ComboBox1.Value & " LIKE '%" & Me.TextSearch.Value & "%'"
End If
Code:
If Me.ComboBox1.Value = "ALL" And sDate <> "" And Me.ComboBox1.Value = "ALL" And eDate <> "" Then ' this is working
qry = "SELECT * FROM TBL_PlabInput where Process_DateTime BETWEEN #" & sDate & "# AND #" & eDate & "#"
End If
Both are working fine when user separately.
when try to combine them together nothing worrks.
What I want is, first query to work when date range is given.
Please help.