Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Nov 2003
    Location
    London, Gtr London, England
    Posts
    222
    Thanks
    0
    Thanked 0 Times in 0 Posts

    #Error display in Report (2003 (11.6566.6568) SP2)

    Hi there!

    I have been asked to look at a problem with a report that is generating the above error, but although I have developed a workaround I am somewhat puzzled as to whether I could have fixed the original statement. Basically it concerns manipulation of a field that has been titled "name" in the underlying SQL. If the field is placed directly onto the report, then the name is displayed with no problem. However, if the field is modified with an "=" sign at the start, then "name" changes to [Name] and the report name is displayed instead. If you take it further and add in & " " & [surname] then you get the #Error displayed.

    This is the original statement " =Trim(Report![name] & " " & [surname])"

    The purpose of modifying the text box was to combine the name and surname fields. I have got round this by creating a field in the query called "FullName" that combines the fields and I then place that on the report in place of the original. I have also noticed that if I leave the original text box and place the "name" field on the report then the original text box displays the "name" and "surname" as required!

    Can anyone clarify for me what is going on here and whether there is a fix for the original statement?

    Cheers,

    Niven

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: #Error display in Report (2003 (11.6566.6568) SP2)

    Name is a built-in property of many objects in Access, so you should avoid using it as a field name in tables and queries.

  3. #3
    3 Star Lounger
    Join Date
    Nov 2003
    Location
    London, Gtr London, England
    Posts
    222
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: #Error display in Report (2003 (11.6566.6568) SP2)

    I thought that might be the case. The client in question reckons this report has only just stopped working, but I don't think it has ever worked!

    Many thanks your reply,

    Niven

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •