lovas
08-12-2003, 08:25 AM
Hello, I am building reports for the internet. When this particular report is run, a sub on read is performed and inside of that I want an InStr function to look in a table.column for various data and if it finds any of them to display Mechanical or Motors in the appropriate place on the page. I am sorry, I cannot figure out how to write it, this will help.
String being searched = deliveries.line_code
String to find = C30, C31, D00, D10, D11, D37
Variable = ProdLineCode
If it finds any of the 'String to find' values it must display Mechanical in the variable position.
I tried this:
If InStr(ssr_deliveries_line_code,C30, C31, D00, D10, D11, D37,) then
ProdLineCode = "Mechanical"
elseif InStr(ssr_deliveries_line_code,A40, B00, B01, B02, B03, B04, B10, B11, B12,) then
ProdLineCode = "Motors"
end if
Please Help?
String being searched = deliveries.line_code
String to find = C30, C31, D00, D10, D11, D37
Variable = ProdLineCode
If it finds any of the 'String to find' values it must display Mechanical in the variable position.
I tried this:
If InStr(ssr_deliveries_line_code,C30, C31, D00, D10, D11, D37,) then
ProdLineCode = "Mechanical"
elseif InStr(ssr_deliveries_line_code,A40, B00, B01, B02, B03, B04, B10, B11, B12,) then
ProdLineCode = "Motors"
end if
Please Help?