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

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???
 
B

Benjamin

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
 
M

Marshall Barton

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.
 
D

David Peterson

Thanks.
The textbox name and the control source name were the same.
Changing the name of the textbox allowed the code to work.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top