Results 1 to 10 of 10
  1. #1
    Join Date
    Nov 2009
    Location
    Berkshire, UK
    Posts
    30

    Unanswered: Unwanted single quote in report field

    Novice alert!

    I have designed a report containing a text box that displays the full name of job applicants taken from a table called Applicants. The SQL is:

    Code:
    SELECT Applicants.*, [Title] & " " & [FirstName] & " " & [LastName] AS Applicant
    FROM Applicants
    WHERE (((Applicants.DateReceived)<=[Forms]![frmDataEntry]![txtDeadline]))
    ORDER BY Applicants.LastName;
    This works, but a single quote is displayed at the beginning of each entry in the report, like this:

    'Mr J Rabbit
    'Mrs P Mouse
    'Miss T Badger
    Why does this happen and how can I get rid of it please?

    Mike

  2. #2
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Well, I would check the content of Title. Access doesn't do this so the apostrophe must be there in the data.
    Testimonial:
    pootle flump
    ur codings are working excelent.

  3. #3
    Join Date
    Nov 2009
    Location
    Berkshire, UK
    Posts
    30
    Quote Originally Posted by pootle flump View Post
    Well, I would check the content of Title. Access doesn't do this so the apostrophe must be there in the data.
    Thanks for the suggestion, I've had a look at that. Title is a text field, and there is no apostrophe in the data table

    It doesn't appear if I run the query either, only in the report.

    Mike

  4. #4
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Could you humour me and run this?
    Code:
    SELECT LEFT([Title], 1) AS x,  ASC(LEFT([Title], 1)) AS y
    FROM Applicants 
    WHERE Applicants.DateReceived <=[Forms]![frmDataEntry]![txtDeadline]
    Please also post whatever expression\ code is being used to populate the report textbox.
    Testimonial:
    pootle flump
    ur codings are working excelent.

  5. #5
    Join Date
    Nov 2009
    Location
    Berkshire, UK
    Posts
    30
    Quote Originally Posted by pootle flump View Post
    Could you humour me and run this?
    Code:
    SELECT LEFT([Title], 1) AS x,  ASC(LEFT([Title], 1)) AS y
    FROM Applicants 
    WHERE Applicants.DateReceived <=[Forms]![frmDataEntry]![txtDeadline]
    Please also post whatever expression\ code is being used to populate the report textbox.
    x=M, y=77

    The data source for the report is the query given in my original post, and the data source for the text box is Applicant from the same query.

    I know this is going to be something really stupid, I just know it

    Thanks,

    Mike

  6. #6
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Can you remove all extraneous objects from your database, including any sensitive data, and upload it please? Change the extension to ".txt" or zip it up before uploading.
    Testimonial:
    pootle flump
    ur codings are working excelent.

  7. #7
    Join Date
    Nov 2009
    Location
    Berkshire, UK
    Posts
    30
    OK, here it is with no data and a .txt extension.

    When you open the database, click on one of the three Checklist buttons on the right of the data entry form and a report will open. Even though there is no data behind it, there is still an apostrophe in the Name field.

    Mike
    Attached Files Attached Files

  8. #8
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    What you can see is not an apostrophe. By default when you add a text box an associated label is added too. Because this text box is so far left it is almost (but not entirely) covering the label. Delete the label and the mark disappears. I've forgotten how you set control defaults but you can prevent this rather annoying Accessism.
    Testimonial:
    pootle flump
    ur codings are working excelent.

  9. #9
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    remove or hide the label thats lurking behind the 'application' control
    I'd rather be riding on the Tiger 800 or the Norton

  10. #10
    Join Date
    Nov 2009
    Location
    Berkshire, UK
    Posts
    30
    Thank you! I knew it would be something stupid on my part.

    Cheers

    Mike

Posting Permissions

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