By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,851 Members | 1,193 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,851 IT Pros & Developers. It's quick & easy.

Spaces in Field Names?

P: n/a
I have a simple db to keep track of work/time/projects etc. It has two
fields (column) named "start time" and "end time"
WITH THE SPACES. I'm trying to do some automation to a form associated with
the db and notice that in all the examples
I've seen nobody EVER includes spaces in the names of fields. Now I'm
getting a sinking feeling....

Can anyone quickly outline the kinds of problems I'm going to encounter with
these names?
--

MichaelB
www.michaelbulatovich.com

Nov 12 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
DFS
The only problem I've encountered with spaces in the field names is you
usually have to enclose such names in square brackets [].

So it's a little extra typing, but that's it.

"Michael Bulatovich" <Pl****@dont.try> wrote in message
news:aS*********************@news20.bellglobal.com ...
I have a simple db to keep track of work/time/projects etc. It has two
fields (column) named "start time" and "end time"
WITH THE SPACES. I'm trying to do some automation to a form associated with the db and notice that in all the examples
I've seen nobody EVER includes spaces in the names of fields. Now I'm
getting a sinking feeling....

Can anyone quickly outline the kinds of problems I'm going to encounter with these names?
--

MichaelB
www.michaelbulatovich.com

Nov 12 '05 #2

P: n/a
"Michael Bulatovich" <Pl****@dont.try> wrote in message
news:aS*********************@news20.bellglobal.com ...
I have a simple db to keep track of work/time/projects etc. It has two
fields (column) named "start time" and "end time"
WITH THE SPACES. I'm trying to do some automation to a form associated with the db and notice that in all the examples
I've seen nobody EVER includes spaces in the names of fields. Now I'm
getting a sinking feeling....

Can anyone quickly outline the kinds of problems I'm going to encounter with these names?


Within Access it's not really a "big" issue as long as you enclose the
field names in square brackets like [start time].

There is the rather obscure method of creating a pseudo-table within a
query and the syntax requires that the pseudo-table SQL be enclosed in the
same square brackets and the method doesn't work with additional square
brackets inside of those. This would make that method impossible if your
had field names had spaces in them.

If you ever need to upsize your table to a server database, that server
might not allow spaces in the names and then you will have the additional
hassle of renaming them.

Sometimes you can simply forget the brackets and end up chasing your tail
for a while when something doesn't work.

Overall, most developers have simply come to the conclusion that the spaces
don't provide enough "Pros" to outweigh the "Cons" and so avoid them. One
can always use query aliases and caption properties when they want to *see*
spaces in a datasheet so having the spaces in the actual field names is
just not necessary.
--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.