New line in field

  • Thread starter Thread starter Mo
  • Start date Start date
M

Mo

I have just inherited a db and now need to export data from this db into a
fixed-width text file.

The problem I'm having is with an address field. On the form where these
addresses were entered, 'New Line in Field' has been selected for the 'Enter
key behaviour' option. This allows users to use the return key to
effectively add a new line in a text box for each line of the address. Only
some of the addresses in the table have been entered with 'new lines' so to
speak.

This causes a particular problem when exporting In my text file, each time
there is a record where the address field has been input using this option,
it is being interpreted as a new record.

Is there a way to format the address field to remove this behaviour
entirely, perhaps in a query?

Thnaks for any help.

Mo
 
If you are using A2K or later, you can use the Replace() function in an
Update Query to replace the NewLine + CarriageReturn with a marker that
doesn't affect your import.

If you are using A2K, there is a bug with Replace in Query and you will need
to write a "wrapper" function.

OTOH, you may be able to export from Access (or import ) to the other
database format without going through the intermediate Text-file step.
 
Thanks very much for your prompt reply. Access help doesn't list an example
of the syntax of the 'Peplace' function. Can you possibly provide one?
 
Back
Top