Spaces in Field Names

H

HT

Question regarding both 2003 and 2007 - it seems like in 2003 it was
important to have no spaces in the field name but that doesn't appear to be
the case in 2007, at least based on the field names I see from the field
templates. What's the recommendation?
 
J

Jeff Boyce

You may get more than one opinion ...

JOPO - just one person's opinion:

No spaces, no way, no where, no how. ... unless you want troubles referring
to the fieldnames in procedures, or ever plan to migrate the data to SQL
Server (or other more robust back-end), or remember to always surround your
fieldnames with square brackets ("[field name]"), or ...

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
H

HT

Thanks, Jeff. I was wondering about that. I guess I'm just confused/surprised
that the field templates in 2007 don't show any field names without spaces,
not even in design view, so I wondered if somehow that changed in 2007.

I get there are different opinions on this, but better safe than sorry,
since we can always show a different name with the caption, right? So no
spaces it is, and I will recommend that to others!

Heather

Jeff Boyce said:
You may get more than one opinion ...

JOPO - just one person's opinion:

No spaces, no way, no where, no how. ... unless you want troubles referring
to the fieldnames in procedures, or ever plan to migrate the data to SQL
Server (or other more robust back-end), or remember to always surround your
fieldnames with square brackets ("[field name]"), or ...

Regards

Jeff Boyce
Microsoft Office/Access MVP


HT said:
Question regarding both 2003 and 2007 - it seems like in 2003 it was
important to have no spaces in the field name but that doesn't appear to
be
the case in 2007, at least based on the field names I see from the field
templates. What's the recommendation?
 
J

Jeff Boyce

Wait 'til you get other opinions.

A sample of size 1 is random...

Jeff

HT said:
Thanks, Jeff. I was wondering about that. I guess I'm just
confused/surprised
that the field templates in 2007 don't show any field names without
spaces,
not even in design view, so I wondered if somehow that changed in 2007.

I get there are different opinions on this, but better safe than sorry,
since we can always show a different name with the caption, right? So no
spaces it is, and I will recommend that to others!

Heather

Jeff Boyce said:
You may get more than one opinion ...

JOPO - just one person's opinion:

No spaces, no way, no where, no how. ... unless you want troubles
referring
to the fieldnames in procedures, or ever plan to migrate the data to SQL
Server (or other more robust back-end), or remember to always surround
your
fieldnames with square brackets ("[field name]"), or ...

Regards

Jeff Boyce
Microsoft Office/Access MVP


HT said:
Question regarding both 2003 and 2007 - it seems like in 2003 it was
important to have no spaces in the field name but that doesn't appear
to
be
the case in 2007, at least based on the field names I see from the
field
templates. What's the recommendation?
 
J

John W. Vinson

Question regarding both 2003 and 2007 - it seems like in 2003 it was
important to have no spaces in the field name but that doesn't appear to be
the case in 2007, at least based on the field names I see from the field
templates. What's the recommendation?

You can use spaces in names... if you a) ALWAYS use [square brackets] in SQL,
VBA, and other field references; and b) accept that this will give you (or
some poor frustrated successor) major headaches if you ever need to upsize to
SQL/Server or another database engine that isn't so friendly.

I think Microsoft's programmers are misguided and try in many ways - spaces in
table and fieldnames, Lookup fields, subdatasheets, on and on - to make it
easier to use Tables as interaction medium, apparently on the assumption that
this makes it easier for naive users to become productive in Access. It
unfortunately (IMHO) has the exact opposite result - it leads to tables being
seen as glorified spreadsheets, militates against learning about normalization
and proper relational design, and makes it easy to get from Point A to Point B
to Point C but makes it *vastly harder* to get to J, K and L.
 

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