Strange problem.

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

Guest

Hello,
I have a database with few fields including "Name" and "TIN".

I want to create a report such that
=IIf([TIN]<>"",[Name] & char(13) & "Tin: " & [TIN],[Name])

but its not working. Name is displaying name of the report and char (13)
"New Line" is also not working.

Please guide.

Rahul.
 
Hi Rahul,

in the NAME property of the control, change it to something else... like
MyName -- or something more descriptive. then use the name you have
created in your equation instead of [Name]

Problem names and reserved words in Access, Allen Browne
http://www.allenbrowne.com/AppIssueBadWord.html

~~~~~~~~~~~

instead of char(13), try chr(13) & chr(10)

~~~~~~~~~~~

Warm Regards,
Crystal
*
(: have an awesome day :)
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*
 
Try:

=IIf( [TIN]<>"",
Report![Name] & Chr(13) & Chr(10) & "Tin: " & [TIN],
Report![Name] )

(I break into multiple lines for clarity but you should use all on one
line).

You should not use "Name" as a Field name in your Tables. Every object in
Access has the Property "Name".
 
Hello,
I have a database with few fields including "Name" and "TIN".

I want to create a report such that
=IIf([TIN]<>"",[Name] & char(13) & "Tin: " & [TIN],[Name])

but its not working. Name is displaying name of the report and char (13)
"New Line" is also not working.

Please guide.

Rahul.

Name is a reserved word. Reports have a Name property; tables have a
Name property; almost anything in an Access database has a Name
property. I'd very strongly suggest changing the Name of the Name
field to some other Name that isn't a reserved Name.

A new line requires TWO characters: Chr(13) & Chr(10) in that order
(carriage return and line feed). (Note Chr() not Char()).

John W. Vinson[MVP]
 

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

Back
Top