S
shaneo via AccessMonster.com
Hi there
I have an SQL statement that I am trying to get working but am having some
problems
This is the statement I am trying to use
strSQL = "SELECT tblMain.* " & _
"FROM tblMain " & _
"WHERE tblMain.TempName like[Forms]![frmSearch]![txtSearch1].
value" & _
"ORDER BY tblMain.[Bkg No],tblMain.[Surname],tblName[TempName]
,tblName[Department]," & _
"tblMain.[Taken By],tblMain.[Reporting To],tblMain[Start
Date],tblMain[End Date]"
When I try to run it tho I get a runtime error 3075.
Can anyone see what I am doing wrong?
How can I also modify the statement to search values that are LIKE they
values I enter into txtSearch1 as I would like to be able to enter e.g Sha
and find all the names that are LIKE Sha e.g Shane Shaun etc etc.
Hope someone can help out
TIA!!
I have an SQL statement that I am trying to get working but am having some
problems
This is the statement I am trying to use
strSQL = "SELECT tblMain.* " & _
"FROM tblMain " & _
"WHERE tblMain.TempName like[Forms]![frmSearch]![txtSearch1].
value" & _
"ORDER BY tblMain.[Bkg No],tblMain.[Surname],tblName[TempName]
,tblName[Department]," & _
"tblMain.[Taken By],tblMain.[Reporting To],tblMain[Start
Date],tblMain[End Date]"
When I try to run it tho I get a runtime error 3075.
Can anyone see what I am doing wrong?
How can I also modify the statement to search values that are LIKE they
values I enter into txtSearch1 as I would like to be able to enter e.g Sha
and find all the names that are LIKE Sha e.g Shane Shaun etc etc.
Hope someone can help out
TIA!!