The code
If InStr(1, Right(zkTxt, 6), LCase(Me.TxtRev.Value)) = 0 Then GoTo nextC
checks if the text you type in this case in the Revision? field exists if 0 it does not exist so the next row is checked
zkTxt is the string that contains all the columns for one row concatenated with a | as separator, that is why with the prd (Product Name) I check the p1 to find the first | and the P2 for the one after that, between p1 and p2 is the data for the product name
see below some the contents for the first six row, the contents of zktxt for each row
|17|Alice Mutton|20 - 1 kg tins|2017|30125|Yes
|3|Aniseed Syrup|12 - 550 ml bottles|2017|58960|
|40|Boston Crab Meat|24 - 4 oz tins|2018|45734|Yes
|60|Camembert Pierrot|15 - 300 g rounds|2019|58977|
|18|PLUS Carnarvon Tigers|15 kg pkg.|2016|87445|Yes
|18|Carnarvon Tigers|16 kg pkg.|2016|95541|Yes
Bookmarks