SQL Server allows trailing blanks at the end of the field,
and I believe SQL Server is the industry standard nowadays.
Yes, and you can also store blanks in a JET table also.
However, you don't want to confuse ms-access with the database engine?
ms-access is just the editor here, or a tool that connects to YOUR
database of choice. (you can use ms-access with sql server for example).
You can use ms-access with sql server, with Oracle, or in our case with JET.
All of these database engines can store blanks, but when you
build a form and "edit" the data, then the trailing blanks are removed. JET,
ms-sql server, or Oracle do NOT remove the training blanks.
So, you can safely store trailing blanks..but the screen editor removes
them....
You can safely replace, insert and save blanks to a table. To further
clarify, only trailing blanks are removed by the SCREEN editor, and not the
data engine!
If you enter into the screen editor:
Hello how are you
The blanks are kept intact. however, if you enter
Hello how are you _______
The "_______" in this example is assumed to be trailing blanks...they will
be removed when you hit enter(or tab) on the screen
However, noting is stopping you from using sql update statements or code to
insert blanks into the data and save it.
Here is my need for trailing blanks.
I have a table with two fields: "Code"
and "Replacement". The Code field may have "'" and
the corresponding replacement field has an apostrophe
("'"). The table is used to go through text and make
replacements.
What a great example you have! (I am serous!)
Ok, my suggestion here would be to code an exception
I assume you now have:
Code Replacement
&apos '
&aExclam !
&HBlank Blank
You code then would have to take the word "blank" and subsite a space ( " ")
Furhter, you COULD force the issue, and have all data surrounded by quotes,
and thus during data entry
you could enter:
Code Replacement
&apos "'"
&aExclam "!"
&HBlank " "
In the above case, then during data entry, quotes would be entered around
whatever you enter. As mentioned, there is certainly no problem with leading
blanks, or blanks entering in the middle...it is only trailing blanks that
are removed here (as most screen editors have always removed them).
I would also make sure you turn off "allow autocorrect" in the other tab,
least you have the office "auto correct" try and fix/change what you type
in!
(you will find this setting in the "other" tab of the text box control when
designing a form).
So, if your design is such now that quotes are entered, then the blanks in
the prefix, or middle of the string will remain.
It is only as mentioned the trailing blanks that get removed. If your entry
stuff is being changed, then I would check the tools->autocorrect options
(I usually turn this stuff off!!).