Access Report Labels

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to print simple labels with data from a Query. I use the Labels Wizard. The first category is the person's name
When veiwing the report, it gives the name of the report.Why?
 
You have probably made the mistake of naming your field name "Name". As you
have found, all objects in Access have a name property so it is not
recommended to give a name of "Name". A much better convention is to use
PersonName. I would also create separate fields for Last Name and First
Name.

--
Duane Hookom
MS Access MVP


dusouth said:
I am trying to print simple labels with data from a Query. I use the
Labels Wizard. The first category is the person's name.
 
dusouth said:
I am trying to print simple labels with data from a Query. I use the Labels Wizard. The first category is the person's name.
When veiwing the report, it gives the name of the report.Why??


It sounds like your field in the table/query is named Name.
Along with many others, that is an Access reserved word (in
this case it refers to the report's name). You should not
use field/control/variable names that might be confused with
Access' internal meaning. Instead you should name your
table fields with something more closely related to the
entity the table is modeling such as CustomerName. It's
common practice to name controls with a 3 character prefix
that indicates the type of control, e.g. txtCustomerName fo
a text box. Variable in VBA code are often named with a
three or more character prefix that indicates its scope and
type, e.g. mstrCustomerName for a module level string
variable.

A quick and dirty workaround that usually works is to
enclose the field name in [ ] but you really should
change the name of the field in the table.
 
dusouth said:
I am trying to print simple labels with data from a Query. I use the
Labels Wizard. The first category is the person's name.
When veiwing the report, it gives the name of the report.Why??

In addition to Marshall and Duanes replies, here is a listing of Access
and VBA reserved words, so that you don't create the same sort of
problem for yourself in the future:

See Microsoft KnowledgeBase article:

109312 'Reserved Words in Microsoft Access'
209187 'Acc2000: 'Reserved Words in Microsoft Access'
286335 'ACC2002: Reserved Words in Microsoft Access'
 
Back
Top