related( Help page does not give an example of how to handle a field name with spaces so it is understandable that Sam got confused with the way to set up the formula. Since the parameter is a formula that is going to be used “as is” in the function. It has to be written so that it make sense when it is executed. I’ll use a simple
execute statement to show what is happening.
If I want the field named “Test Field” to be set to a value using
execute with a variable having the field’s name and write it like this:
let x="Test Field"
I’ll get an error because the field name has a space and will be executed as:
Now if I write the code like this:
let x="«Test Field»"
It executes as:
I always try to eliminate spaces in my field names and this is very easy now that we have the option in the Field Properties Dialog to set the Title to something other than the actual field name. So, in my example above I could have the actual field name as “TestField” and have the title set to “Test Field” for display in the datasheet. Now both versions of the formula would work once I change the value of x to “TestField”. The down side is that you have to remember that the actual field name is other than what is displayed in the datasheet when coding a procedure.
Hope this casts a little light on the subject and doesn’t make it even more confusing.