i am trying to show a report of a specific customer
when i hit the buttonreport i see his history only if his name dosnt contain this '
e.x salsa31 this is ok
salsa's room here i get the error when i hit the button report
if it does then i get syntax error
this is the code i am using to show this report
this is the function that supposed to bypass this'
also tried this
i tried everything still get the same error
when i hit the buttonreport i see his history only if his name dosnt contain this '
e.x salsa31 this is ok
salsa's room here i get the error when i hit the button report
if it does then i get syntax error
this is the code i am using to show this report
Code:
Private Sub BttnReport_Click()
Set DtrTempPay.DataSource = CN.Execute("SELECT * FROM TempCash WHERE TempCust = '" & FrmDailyCash.LsVw.SelectedItem.SubItems(3) & ("'"))
DtrTempPay.Show 1
End Sub
Code:
Function RplS(s As String) As String
RplS = Replace$(s, "'", "''")
End Function
Code:
Set DtrTempPay.DataSource = CN.Execute("SELECT * FROM TempCash WHERE TempCust = '" & FrmDailyCash.LsVw.SelectedItem.SubItems(3) & RplS("'"))