David McAfee
davidmcafee at gmail.com
Thu Aug 1 17:19:43 CDT 2013
WAG, but instead of replacing only the single CR, could you look for CRCR or CRCRLF? Maybe set a variable to it and use the variable in the REPLACE? On Thu, Aug 1, 2013 at 2:53 PM, Brad Marks <BradM at blackforestltd.com> wrote: > All, > > We have an Access-based system that pulls records via ODBC from a > purchased Accounting system in order to generate EDI transactions. > > For over three years, everything has worked nicely. > > Today, one of the generated EDI transactions failed. In looking at the > records pulled from the Accounting system, it appears that a small > number of the records end with CRCRLF instead of just CRLF (Carriage > Return Line Feed). > > I can change the CR (Hex od) to spaces with a replace command like this > > Str_A = Replace(Str_A, Chr(13), " ") > > > However, I don't want to replace all CRs with spaces. I only want to > replace the first CR with spaces when I find CRCRLF. > > Is there a way to do this with VBA? > > Thanks, > Brad > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com >