
VIP

Trusted Members

June 25, 2016

Hi Christopher
Try changing this line of code from
RecordRow = Application.Match(CLng(TextBox1.Value), Range("Table1[Record]"), 0)
to
RecordRow = Application.Match(TextBox1.Value, Range("Table1[Store]"), 0)
1) You are searching for text so no need to convert to CLng
2) You are searching the wrong field Record instead of Store
Hope this helps.
Sunny

Active Member

February 5, 2020

Hi Sunny,
Thank you for your help. This works only when I am searching by Store, but does not work when I am searching by any other field even if I include the Store in the search, for example : Store - NOF, product - Apples. Do not receive the correct answer.
Again much appreciate the help
Christopher

VIP

Trusted Members

June 25, 2016



October 5, 2010

Hi Christopher,
As Sunny said, the form in my blog post was designed to only search using one field and to return 1 record.
How do you wish the search to work? Do you want to be able to specify multiple fields and then return all matching records?
If so do you want to then pick just 1 record to edit?
I notice that the spelling of certain things is not consistent in your data. There are several different spellings of Kelloggs and Baguette. These inconsistencies will mess up searches.
Have you considered just using the filters on the table to find what you want?
Regards
Phil
1 Guest(s)
