Here is the complete query of the error.
I have a combobox, a txtbox namely txtsearch and a datalistfield in which all the titles of the book will appear.
Private Sub txtsearchbook_Change()
If cmbsearchbook.Text <> "" Then
adobooksearch.RecordSource = "SELECT * from tblbooks where " & cmbsearchbook & " like '%" & txtsearchbook.Text & "%'"
adobooksearch.RecordSource = "SELECT * from tblbooks" 'where Author like '%" & "#" & "%'"
It looks like your WHERE criteria contains a value with an apostraphe so your SQL statement is breaking as the criteria itself needs to be enclosed within apostraphes.
You can either use parameterised queries or escape your search criteria. For example "SELECT * from tblbooks where " & cmbsearchbook & " like '%" & Replace(txtsearchbook.Text, "'", "''") & "%'". Note how the replace function has been used to take one apostraphe and replace it with two, thus escaping it.
Help! I want to create a java program that finds the highest even integer among the values entered by the user. Stop asking values when a value less than 1 have been entered. If no even integer is entered, display "No Even Integer"
Hi, as I was told that my code doesn’t scale well at all, I thought perhaps I’d try to get a better understanding of interfaces/abstract classes and classes and the relationship between them.
I don’t want at this stage work on a big separate project as I've already got plenty ...