Hello
I'm using an Access (could be 2000 or higher. Didn't make it) database.
I have a search box on a website where visitors can search for item numbers (tblItem > ItemCD).
Everything is fine if I use
Problem is that some partnumber contain spaces, other do not... and with the code above the number or part of it has to be inputted as it is in the table.
What I would like to achieve is that from the input from the search all spaces are out:
And this is working.
But I also want to do a:
in the query itself... and that is not working.
The table 'tblItem' contains about 75000 records.
I got following error.
Microsoft JET Database Engine error '80040e14'
Undefined function 'replace' in expression.
This is the code
Any help or other possibility would be appreciated.
Thx
Flokke
I'm using an Access (could be 2000 or higher. Didn't make it) database.
I have a search box on a website where visitors can search for item numbers (tblItem > ItemCD).
Everything is fine if I use
Code:
artikelnummer2 = request.form("f_zoek")
artikelnummer = trim(artikelnummer2)
IF artikelnummer <> "" THEN
set oRSonderdeel = server.CreateObject("ADODB.recordset")
sqltext = "SELECT * FROM tblItem WHERE ItemCD LIKE '%"& artikelnummer & "%' ORDER BY ItemCD"
What I would like to achieve is that from the input from the search all spaces are out:
Code:
artnr = replace(artikelnummer, " ", "")
But I also want to do a:
Code:
replace('ItemCD',' ','')
The table 'tblItem' contains about 75000 records.
I got following error.
Microsoft JET Database Engine error '80040e14'
Undefined function 'replace' in expression.
This is the code
Code:
artikelnummer2 = request.form("f_zoek")
artikelnummer = trim(artikelnummer2)
artnr = replace(artikelnummer, " ", "")
IF artnr <> "" THEN
set oRSonderdeel = server.CreateObject("ADODB.recordset")
sqltext = "SELECT * FROM tblItem WHERE replace('ItemCD',' ','') LIKE '%"& artnr & "%' ORDER BY ItemCD"
Thx
Flokke
Comment