Hi
I am struct with following code in below query involve 2 tables including numeric and text fields.
this is my row source for LstEmployees which is placed on frmSearch
One search text box on form linked to LstEmployees to filter result Similar to search box text or numbers with in above tables fields.
You kind help is required to resolve the query.
I am struct with following code in below query involve 2 tables including numeric and text fields.
Code:
Option Compare Database
Option Explicit
Private Sub btnSearch_Click()
Dim SQL As String
SQL = "SELECT tblEmployees.EmpID, tblEmployees.FullName, tblEmployees.Surname, tblEmployees.Gender, tblEmployees.Nationality, tblResidentID.Resident_ID FROM tblEmployees INNER JOIN tblResidentID ON tblEmployees.EmpID = tblResidentID.ID;"
& " from tblemployees" _
& where [EmpID]"like '*" & me.txtSearch &"*' " _
& or [Fullname]"Like '*" & me.txtSearch &"*' " _
& or [Surname]"Like '*" & me.txtSearch &"*' " _
& or [Gender]"Like '*" & me.txtSearch &"*'" _
& or [Nationality] " Like '*" & me.txtSearch &"*'" _
End Sub
this is my row source for LstEmployees which is placed on frmSearch
Code:
Option Compare Database
Option Explicit
Private Sub btnSearch_Click()
Dim SQL As String
SELECT tblEmployees.EmpID, tblEmployees.FullName, tblEmployees.Surname, tblEmployees.Gender, tblEmployees.Nationality, tblResidentID.Resident_ID FROM tblEmployees INNER JOIN tblResidentID ON tblEmployees.EmpID = tblResidentID.ID;"
End Sub
One search text box on form linked to LstEmployees to filter result Similar to search box text or numbers with in above tables fields.
You kind help is required to resolve the query.