View Full Version : Trying to refer to a column in a table but recieve error


2e1fmo
03-07-2002, 08:23 AM
Hi,

I am trying to call a function and take a value to the procedure. The value is a field in a table. this is the command

AddOwner !OwnerCode, !Holiday Sector

OwnerCode and Holiday sector are two fields in a table which I need to take over to the function AddOwner.

The problem occurs with the space between Holiday and Sector. I recieve the error:

Expected end of statement. and the word Sector is highlighted. Is their a value that i can insert to replace the space. The field must include the space between Holiday and Sector.

Was wondering if i could at the start of the code rename the column to HolidaySector and before it finsihed rename it back to Holiday Sector. But I dont know how to achieve this.

Any help or ideas would be extremely grateful

chrismcbride
03-07-2002, 09:59 AM
You could try Square brakets around the field name.
AddOwner !OwnerCode, ![Holiday Sector]

Access is not big on spaces in object names.
Chris