Re: .Find on integer data
Try changing
SearchValue = InputBox("Enter your search value:", "Database Search")
to
SearchValue = Val(InputBox("Enter your search value:", "Database Search"))
:confused:
Re: .Find on integer data
No luck! Unfortunately I'm still getting the same error. Any other suggestions?
Thanks for the help!
Stephanie
Re: .Find on integer data
I may be wrong, but think it may have something to do with the single quotes in this line:
Code:
.Find (SearchField & " Like '%" & SearchValue & "%'")
When inserting or querying numeric values in databases single quotes are not typically used in SQL statements, so maybe you're seeing a related issue? Also, I'm not sure whether LIKE can be used for numeric data.
For example, if data in db is of string/text type, the values are surrounded by single quotes in SQL and if data is of date type, the values are surrounded by # marks in SQL.
SELECT your_string_data FROM your_table
WHERE your_string_data LIKE '%blah%';
SELECT your_numeric_data FROM your_table
WHERE your_numeric_data = 12;