if IsNull (txtSearch2.Value ) = true then
---------------
Try to dispel spaces in your fieldnames if its not too late.
strSQL = "SELECT tblMain.bkg no,tblMain.Surname,tblMain.TempName, tblMain.Department, tblMain.Taken By, tblMain.Reporting_To,tblMain.Start_Date,tblMain.End_Date "...