Ampersand in Field Caption

G

Guest

I have a make table query in which I want to enter a field caption that
contains an ampersand.
When I save the query and re-open it, it inserts spaces around the ampersand.

Test&Caption: [FieldName] becomes Test & Caption: [FieldName]

How can I force the caption to remain as is?

TIA.
 
J

Joe Cilinceon

Ken said:
I have a make table query in which I want to enter a field caption
that contains an ampersand.
When I save the query and re-open it, it inserts spaces around the
ampersand.

Test&Caption: [FieldName] becomes Test & Caption: [FieldName]

How can I force the caption to remain as is?

TIA.

Enter the ampersand twice &&

Test && Caption:[FieldName]
 
G

Guest

Hi Joe,
That seems to work in a select query, but in a make table query, it creates
Test&&Caption.
--
Ken Hudson


Joe Cilinceon said:
Ken said:
I have a make table query in which I want to enter a field caption
that contains an ampersand.
When I save the query and re-open it, it inserts spaces around the
ampersand.

Test&Caption: [FieldName] becomes Test & Caption: [FieldName]

How can I force the caption to remain as is?

TIA.

Enter the ampersand twice &&

Test && Caption:[FieldName]
 
J

John Spencer

Try surrounding it with brackets.
[Test&Caption]



Ken said:
Hi Joe,
That seems to work in a select query, but in a make table query, it creates
Test&&Caption.
--
Ken Hudson

Joe Cilinceon said:
Ken said:
I have a make table query in which I want to enter a field caption
that contains an ampersand.
When I save the query and re-open it, it inserts spaces around the
ampersand.

Test&Caption: [FieldName] becomes Test & Caption: [FieldName]

How can I force the caption to remain as is?

TIA.

Enter the ampersand twice &&

Test && Caption:[FieldName]
 
G

Guest

Hi John,
Tried that. I get an error messsage with brackets.
--
Ken Hudson


John Spencer said:
Try surrounding it with brackets.
[Test&Caption]



Ken said:
Hi Joe,
That seems to work in a select query, but in a make table query, it creates
Test&&Caption.
--
Ken Hudson

Joe Cilinceon said:
Ken Hudson wrote:
I have a make table query in which I want to enter a field caption
that contains an ampersand.
When I save the query and re-open it, it inserts spaces around the
ampersand.

Test&Caption: [FieldName] becomes Test & Caption: [FieldName]

How can I force the caption to remain as is?

TIA.

Enter the ampersand twice &&

Test && Caption:[FieldName]
 
D

Duane Hookom

Why in the world are you attempting to create a field name with an ampersand
in it? I recommend never exposing field names to users and feel an ampersand
suggest expression concatenation.

--
Duane Hookom
MS Access MVP
--

Ken Hudson said:
Hi John,
Tried that. I get an error messsage with brackets.
--
Ken Hudson


John Spencer said:
Try surrounding it with brackets.
[Test&Caption]



Ken said:
Hi Joe,
That seems to work in a select query, but in a make table query, it
creates
Test&&Caption.
--
Ken Hudson

:

Ken Hudson wrote:
I have a make table query in which I want to enter a field caption
that contains an ampersand.
When I save the query and re-open it, it inserts spaces around the
ampersand.

Test&Caption: [FieldName] becomes Test & Caption:
[FieldName]

How can I force the caption to remain as is?

TIA.

Enter the ampersand twice &&

Test && Caption:[FieldName]
 
G

Guest

I was wondering when/if someone would ask that question.
Short answer is that I developed this DB five years ago as a "rookie" and it
has evolved into a rather large/complex DB. I realized a couple of years ago
that the ampersand was a no-no, but didn't want to attempt to change all the
references that involve this field.
--
Ken Hudson


Duane Hookom said:
Why in the world are you attempting to create a field name with an ampersand
in it? I recommend never exposing field names to users and feel an ampersand
suggest expression concatenation.

--
Duane Hookom
MS Access MVP
--

Ken Hudson said:
Hi John,
Tried that. I get an error messsage with brackets.
--
Ken Hudson


John Spencer said:
Try surrounding it with brackets.
[Test&Caption]



Ken Hudson wrote:

Hi Joe,
That seems to work in a select query, but in a make table query, it
creates
Test&&Caption.
--
Ken Hudson

:

Ken Hudson wrote:
I have a make table query in which I want to enter a field caption
that contains an ampersand.
When I save the query and re-open it, it inserts spaces around the
ampersand.

Test&Caption: [FieldName] becomes Test & Caption:
[FieldName]

How can I force the caption to remain as is?

TIA.

Enter the ampersand twice &&

Test && Caption:[FieldName]
 
D

Duane Hookom

Can you use an Append query rather than a Make Table query?

--
Duane Hookom
MS Access MVP
--

Ken Hudson said:
I was wondering when/if someone would ask that question.
Short answer is that I developed this DB five years ago as a "rookie" and
it
has evolved into a rather large/complex DB. I realized a couple of years
ago
that the ampersand was a no-no, but didn't want to attempt to change all
the
references that involve this field.
--
Ken Hudson


Duane Hookom said:
Why in the world are you attempting to create a field name with an
ampersand
in it? I recommend never exposing field names to users and feel an
ampersand
suggest expression concatenation.

--
Duane Hookom
MS Access MVP
--

Ken Hudson said:
Hi John,
Tried that. I get an error messsage with brackets.
--
Ken Hudson


:

Try surrounding it with brackets.
[Test&Caption]



Ken Hudson wrote:

Hi Joe,
That seems to work in a select query, but in a make table query, it
creates
Test&&Caption.
--
Ken Hudson

:

Ken Hudson wrote:
I have a make table query in which I want to enter a field
caption
that contains an ampersand.
When I save the query and re-open it, it inserts spaces around
the
ampersand.

Test&Caption: [FieldName] becomes Test & Caption:
[FieldName]

How can I force the caption to remain as is?

TIA.

Enter the ampersand twice &&

Test && Caption:[FieldName]
 
G

Guest

Hi Duane,
Possibly, but I would have to create a delete query to clear out the table
first.
I decided to bite the bullet and change the field name. It took a couple of
hours yesterday and I may have missed a field reference somewhere but it will
show up eventually.
Next I should go in and change all the field names that have spaces in them.
<bg>
Thanks for all the suggestions.
--
Ken Hudson


Duane Hookom said:
Can you use an Append query rather than a Make Table query?

--
Duane Hookom
MS Access MVP
--

Ken Hudson said:
I was wondering when/if someone would ask that question.
Short answer is that I developed this DB five years ago as a "rookie" and
it
has evolved into a rather large/complex DB. I realized a couple of years
ago
that the ampersand was a no-no, but didn't want to attempt to change all
the
references that involve this field.
--
Ken Hudson


Duane Hookom said:
Why in the world are you attempting to create a field name with an
ampersand
in it? I recommend never exposing field names to users and feel an
ampersand
suggest expression concatenation.

--
Duane Hookom
MS Access MVP
--

Hi John,
Tried that. I get an error messsage with brackets.
--
Ken Hudson


:

Try surrounding it with brackets.
[Test&Caption]



Ken Hudson wrote:

Hi Joe,
That seems to work in a select query, but in a make table query, it
creates
Test&&Caption.
--
Ken Hudson

:

Ken Hudson wrote:
I have a make table query in which I want to enter a field
caption
that contains an ampersand.
When I save the query and re-open it, it inserts spaces around
the
ampersand.

Test&Caption: [FieldName] becomes Test & Caption:
[FieldName]

How can I force the caption to remain as is?

TIA.

Enter the ampersand twice &&

Test && Caption:[FieldName]
 
D

Duane Hookom

Even in my early years of creating Access databases, I never created object
names with spaces or punctuation.
BTW: One of my resolutions for the new year is to stop lying ;-)

--
Duane Hookom
MS Access MVP
--

Ken Hudson said:
Hi Duane,
Possibly, but I would have to create a delete query to clear out the table
first.
I decided to bite the bullet and change the field name. It took a couple
of
hours yesterday and I may have missed a field reference somewhere but it
will
show up eventually.
Next I should go in and change all the field names that have spaces in
them.
<bg>
Thanks for all the suggestions.
--
Ken Hudson


Duane Hookom said:
Can you use an Append query rather than a Make Table query?

--
Duane Hookom
MS Access MVP
--

Ken Hudson said:
I was wondering when/if someone would ask that question.
Short answer is that I developed this DB five years ago as a "rookie"
and
it
has evolved into a rather large/complex DB. I realized a couple of
years
ago
that the ampersand was a no-no, but didn't want to attempt to change
all
the
references that involve this field.
--
Ken Hudson


:

Why in the world are you attempting to create a field name with an
ampersand
in it? I recommend never exposing field names to users and feel an
ampersand
suggest expression concatenation.

--
Duane Hookom
MS Access MVP
--

Hi John,
Tried that. I get an error messsage with brackets.
--
Ken Hudson


:

Try surrounding it with brackets.
[Test&Caption]



Ken Hudson wrote:

Hi Joe,
That seems to work in a select query, but in a make table query,
it
creates
Test&&Caption.
--
Ken Hudson

:

Ken Hudson wrote:
I have a make table query in which I want to enter a field
caption
that contains an ampersand.
When I save the query and re-open it, it inserts spaces
around
the
ampersand.

Test&Caption: [FieldName] becomes Test & Caption:
[FieldName]

How can I force the caption to remain as is?

TIA.

Enter the ampersand twice &&

Test && Caption:[FieldName]
 

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