Pasting into Access Column - Removing Tab Characters and Using Spaces

  • Thread starter Thread starter Kevin K Fosler
  • Start date Start date
K

Kevin K Fosler

I am setting up a MS Access database to record test conditions for a
computer system. One of the columns will contain the code to be tested.
When I copy the code and paste it into Access, square characters are at the
front of each line which I assume are tabs.

How can I paste text into a MS Access database without the tabs (and
preferably with the right number of spaces where the tabs used to be)?

Thanks

Kevin Fosler
 
You can use the Replace function to transform the Tabs into spaces:

Replace(MyString, Chr$(9), " ")

I don't think there's anyway to have it insert the right number of spaces.
 
Kevin K Fosler said:
I am setting up a MS Access database to record test conditions for a
computer system. One of the columns will contain the code to be tested.
When I copy the code and paste it into Access, square characters are at the
front of each line which I assume are tabs.

How can I paste text into a MS Access database without the tabs (and
preferably with the right number of spaces where the tabs used to be)?

Thanks

Kevin Fosler


I've found that if you paste code into Notepad first,
it automatically converts tabs to spaces.


--
 
I've found that if you paste code into Notepad first,
it automatically converts tabs to spaces.

Hmmm, when I tried it, it didn't work. I have tried NoteTab Light, TextPad,
and now Notepad and I can't find a simple way to convert the tabs to spaces.
I really want to use Access to store the code associated with a test, but
this tab thing is making that unusable. I hope someone can come up with a
good option or some good software I can use to convert the tabs to spaces.

Thanks,

Kevin Fosler
 
You need to place some code in the Before_Update event of the text box
that will scan the text from left to right deleting everything that is
not a space character or a regular printable character.
 
Hi Larry, thanks -- I used to be an Access power user but if I don't use it
I lose it. I did finally find a free text editor that converts tabs to
spaces at:

http://cream.sourceforge.net/

I am _very_ surprised that NoteTab and TextPad do not have this. I think I
am going to write to their support to see if I am overlooking something. I
don't have UltraEdit but that product might do that.

Kevin Fosler

You need to place some code in the Before_Update event of the text box
 
Back
Top