QBE Column Name loses spaces

T

T Kirtley

When I use a name such as "FTE - Total" (without the quotes) as a column name
in an Access query (using the QBE screen or SQL code) the name reverts to
"FTE-Total" (with the spaces missing) when the query is saved and reopened. I
have tried using double quotes around the name, and although this preserves
the spaces, it also includes double quotes in the column name. Also, I have
tried using square brackets in the QBE window, but this does not pass the
syntax checker.

Oddly, the spaces in the name remain if the query is run before saving, and
then saved while viewing the results in datasheet view. Unfortunately this is
not much help for me since it takes a significant time to run the query and I
have to edit the query frequently.

Can anyone suggest a workaround for this issue?

TIA for any help.

TK
 
R

RuralGuy

I tried it on my ac2002 system and it preserves the spaces without a
hitch. Have you made sure you have the latest Office patches for your
system? http://office.microsoft.com/en-us/officeupdate/default.aspx

You probably do not want to hear this but using spaces or special
characters in *any* names in Access will give you unexpected grief.
It is not *if* but *when*. It is always better to use CamelFontNames
or Under_Score_Names.

When I use a name such as "FTE - Total" (without the quotes) as a column name
in an Access query (using the QBE screen or SQL code) the name reverts to
"FTE-Total" (with the spaces missing) when the query is saved and reopened. I
have tried using double quotes around the name, and although this preserves
the spaces, it also includes double quotes in the column name. Also, I have
tried using square brackets in the QBE window, but this does not pass the
syntax checker.

Oddly, the spaces in the name remain if the query is run before saving, and
then saved while viewing the results in datasheet view. Unfortunately this is
not much help for me since it takes a significant time to run the query and I
have to edit the query frequently.

Can anyone suggest a workaround for this issue?

TIA for any help.

TK

_______________________________________________
hth - RuralGuy (RG for short)
Please post to the NewsGroup so all may benefit.
 
T

T Kirtley

Thanks for the post.

I am also using ac2002 with all the lastest updates but the problem
persists, even when I created a blank database with only a query like:

"SELECT 1+2*3 AS [FTE - Total]"

If you save this query as SQL and close it without executing, the spaces
will be gone the next time the query is edited or run. If you execute it
before saving, the spaces are still in the name, but if you save while in
datasheet view the spaces will remain until the code is edited and saved
again.

I agree that the use of proper naming conventions is the best solution, and
I'll probably end up modifying the program that accepts the results of this
query to
work with more appropriate column names.

Thanks again,

TK
 
R

RuralGuy

Name AutoCorrect has been known to cause mysterious problems.
Tools>Options General tab and turn it off and turn on Compact on Close
while you are there.

Thanks for the post.

I am also using ac2002 with all the lastest updates but the problem
persists, even when I created a blank database with only a query like:

"SELECT 1+2*3 AS [FTE - Total]"

If you save this query as SQL and close it without executing, the spaces
will be gone the next time the query is edited or run. If you execute it
before saving, the spaces are still in the name, but if you save while in
datasheet view the spaces will remain until the code is edited and saved
again.

I agree that the use of proper naming conventions is the best solution, and
I'll probably end up modifying the program that accepts the results of this
query to
work with more appropriate column names.

Thanks again,

TK

RuralGuy said:
I tried it on my ac2002 system and it preserves the spaces without a
hitch. Have you made sure you have the latest Office patches for your
system? http://office.microsoft.com/en-us/officeupdate/default.aspx

You probably do not want to hear this but using spaces or special
characters in *any* names in Access will give you unexpected grief.
It is not *if* but *when*. It is always better to use CamelFontNames
or Under_Score_Names.



_______________________________________________
hth - RuralGuy (RG for short)
Please post to the NewsGroup so all may benefit.

_______________________________________________
hth - RuralGuy (RG for short)
Please post to the NewsGroup so all may benefit.
 
T

T Kirtley

Thats it! You win a cookie.

I don't know when autocorrect got turned on, but turning it back off solved
the problem.

Thanks a bunch.

TK

RuralGuy said:
Name AutoCorrect has been known to cause mysterious problems.
Tools>Options General tab and turn it off and turn on Compact on Close
while you are there.

Thanks for the post.

I am also using ac2002 with all the lastest updates but the problem
persists, even when I created a blank database with only a query like:

"SELECT 1+2*3 AS [FTE - Total]"

If you save this query as SQL and close it without executing, the spaces
will be gone the next time the query is edited or run. If you execute it
before saving, the spaces are still in the name, but if you save while in
datasheet view the spaces will remain until the code is edited and saved
again.

I agree that the use of proper naming conventions is the best solution, and
I'll probably end up modifying the program that accepts the results of this
query to
work with more appropriate column names.

Thanks again,

TK

RuralGuy said:
I tried it on my ac2002 system and it preserves the spaces without a
hitch. Have you made sure you have the latest Office patches for your
system? http://office.microsoft.com/en-us/officeupdate/default.aspx

You probably do not want to hear this but using spaces or special
characters in *any* names in Access will give you unexpected grief.
It is not *if* but *when*. It is always better to use CamelFontNames
or Under_Score_Names.

On Tue, 30 Aug 2005 15:19:01 -0700, T Kirtley

When I use a name such as "FTE - Total" (without the quotes) as a column name
in an Access query (using the QBE screen or SQL code) the name reverts to
"FTE-Total" (with the spaces missing) when the query is saved and reopened. I
have tried using double quotes around the name, and although this preserves
the spaces, it also includes double quotes in the column name. Also, I have
tried using square brackets in the QBE window, but this does not pass the
syntax checker.

Oddly, the spaces in the name remain if the query is run before saving, and
then saved while viewing the results in datasheet view. Unfortunately this is
not much help for me since it takes a significant time to run the query and I
have to edit the query frequently.

Can anyone suggest a workaround for this issue?

TIA for any help.

TK

_______________________________________________
hth - RuralGuy (RG for short)
Please post to the NewsGroup so all may benefit.

_______________________________________________
hth - RuralGuy (RG for short)
Please post to the NewsGroup so all may benefit.
 
R

RuralGuy

You're very welcome, glad I could help. Toll House I hope!
Thats it! You win a cookie.

I don't know when autocorrect got turned on, but turning it back off solved
the problem.

Thanks a bunch.

TK

RuralGuy said:
Name AutoCorrect has been known to cause mysterious problems.
Tools>Options General tab and turn it off and turn on Compact on Close
while you are there.

Thanks for the post.

I am also using ac2002 with all the lastest updates but the problem
persists, even when I created a blank database with only a query like:

"SELECT 1+2*3 AS [FTE - Total]"

If you save this query as SQL and close it without executing, the spaces
will be gone the next time the query is edited or run. If you execute it
before saving, the spaces are still in the name, but if you save while in
datasheet view the spaces will remain until the code is edited and saved
again.

I agree that the use of proper naming conventions is the best solution, and
I'll probably end up modifying the program that accepts the results of this
query to
work with more appropriate column names.

Thanks again,

TK

:

I tried it on my ac2002 system and it preserves the spaces without a
hitch. Have you made sure you have the latest Office patches for your
system? http://office.microsoft.com/en-us/officeupdate/default.aspx

You probably do not want to hear this but using spaces or special
characters in *any* names in Access will give you unexpected grief.
It is not *if* but *when*. It is always better to use CamelFontNames
or Under_Score_Names.

On Tue, 30 Aug 2005 15:19:01 -0700, T Kirtley

When I use a name such as "FTE - Total" (without the quotes) as a column name
in an Access query (using the QBE screen or SQL code) the name reverts to
"FTE-Total" (with the spaces missing) when the query is saved and reopened. I
have tried using double quotes around the name, and although this preserves
the spaces, it also includes double quotes in the column name. Also, I have
tried using square brackets in the QBE window, but this does not pass the
syntax checker.

Oddly, the spaces in the name remain if the query is run before saving, and
then saved while viewing the results in datasheet view. Unfortunately this is
not much help for me since it takes a significant time to run the query and I
have to edit the query frequently.

Can anyone suggest a workaround for this issue?

TIA for any help.

TK

_______________________________________________
hth - RuralGuy (RG for short)
Please post to the NewsGroup so all may benefit.

_______________________________________________
hth - RuralGuy (RG for short)
Please post to the NewsGroup so all may benefit.

_______________________________________________
hth - RuralGuy (RG for short)
Please post to the NewsGroup so all may benefit.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top