Help! = " " & Name displays "#Error"

  • Thread starter Thread starter David Peterson
  • Start date Start date
D

David Peterson

I have a field on a report where the "Name" is displayed.
The displayed name needs to be indented just a little without moving the
left side of the box.

How???
 
If you put the spaces in front of the name in a query
statement that retrieves the data, you won't have any
problems.

Select " " & ColumnName as Name from Table;

Benjamin
 
David said:
I have a field on a report where the "Name" is displayed.
The displayed name needs to be indented just a little without moving the
left side of the box.


You're using the correct expression. I suspect the problem
is that the text box with this expression is named Name. In
spite of Access' default behavior, it's a bad idea to have
controls with the same name as a record source field.

It's also a very poor idea to use field, control or variable
names that are Access reserved words (Name, Date, etc.
ad nauseum). Sooner or later either you or Access is going
to be confused by the ambiguity of what a name really means.
 
Thanks.
The textbox name and the control source name were the same.
Changing the name of the textbox allowed the code to work.
 
Back
Top