Spaces/Special Characters in Access field names

RaunLGoode

Registered User.
Local time
Today, 00:45
Joined
Feb 18, 2004
Messages
122
I am using Office 2003. I am trying to backfill data into an Access DB that somebody else developed from an Excel worksheet. I do this on other DBs I created using a routine I developed with the help of several people on this forum. (Thanks again)

I use a line of code like:
DBS!ShtNum = ActiveCell.Offset(0, 5).Value
that assigns the value from the cell in the worksheet to field "ShtNum" for the new record in the DB.

My problem is, the developer of the DB has used spaces and special characters in many of the field names, like "Sheet #" which creates an error when I try to run my code. I could modify the field names in the DB to remove the spaces and special characters, but the DB is web accessed and I am fraid that if i mess with the fields I might break a link or otherwise impair the database.
Is there some way to modify my code to allow spaces and special characters?
 
Try

DBS![Sheet #] = ActiveCell.Offset(0, 5).Value
 
Thanks That puts me one step closer
 

Users who are viewing this thread

Back
Top Bottom