string - Access Instr Vba -
i want copy bi!hersteller , bi!produktname new field when bi!hersteller in bi!produktname shall copy bi!produktname new field, i'll show you, codes tried
if instr(1, bi!hersteller, bi!produktname, 1) > 0 .... if instr(1, bi!hersteller, bi!produktname, 1) len(bi!hersteller) ....
either doesnt find string bi!hersteller in bi!produktname @ all, or return of instr incorrect...
an example
bi!hersteller = "siemens" bi!produktname = "siemens lc67ka532"
new field should "siemens lc67ka532"
try this:
dim snewfield dim bi!hersteller : bi!hersteller = "siemens" dim bi!produktname : bi!produktname = "siemens lc67ka532" if instr(bi!produktname, bi!hersteller) > 0 snewfield = bi!produktname else snewfield = bi!hersteller & bi!produktname end if
Comments
Post a Comment