P
Philip Leduc
I need to solve the following problem:
To do filters on a recordset I use a SQL statement, the advantage is that I
can then use that statement to change the recordsource of a subform that
uses the same query as that recordset, a report that uses the same recordset
or another form that uses the same recordset.
strSQL = "SELECT * FROM QrycustomersReport WHERE [cuscompanyName] like '*" &
Me.txtChooseNameLike & "*'"
(I also use this statement in a more complex form with a where clause that
can include multiple checks that results in a composed statement such as
strSQL = "SELECT * FROM QrycustomersReport WHERE [cuscompanyName] like '*" &
Me.txtChooseNameLike & "*' AND [custype] = " & me.cboChoosetype
This works great until the company name (Me.txtChooseNameLike) contains an
apostrophy! Does anyone see a solution?
To do filters on a recordset I use a SQL statement, the advantage is that I
can then use that statement to change the recordsource of a subform that
uses the same query as that recordset, a report that uses the same recordset
or another form that uses the same recordset.
strSQL = "SELECT * FROM QrycustomersReport WHERE [cuscompanyName] like '*" &
Me.txtChooseNameLike & "*'"
(I also use this statement in a more complex form with a where clause that
can include multiple checks that results in a composed statement such as
strSQL = "SELECT * FROM QrycustomersReport WHERE [cuscompanyName] like '*" &
Me.txtChooseNameLike & "*' AND [custype] = " & me.cboChoosetype
This works great until the company name (Me.txtChooseNameLike) contains an
apostrophy! Does anyone see a solution?