Hidden Characters

Leesha
BronzeLounger
Posts: 1484
Joined: 05 Feb 2010, 22:25

Hidden Characters

Post by Leesha »

Hi,
is there a way to find hidden characters in a cell? I have code that auto sends emails and will blow up for no reason. The email format is correct so I'm wondering if there are hidden characters. I'm wondering if there are characters that I don't see. Also I'm wondering if there is an update query that can be run prior to sending out the email that would remove any hidden characters.

Thanks!
Leesha

User avatar
HansV
Administrator
Posts: 78391
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Hidden Characters

Post by HansV »

In what way does the code 'blow up'? Do you get an error message, and if so, what does it say?

Do you have a reason for suspecting that hidden characters cause the problem? And how would hidden characters end up in a field?
Best wishes,
Hans

Leesha
BronzeLounger
Posts: 1484
Joined: 05 Feb 2010, 22:25

Re: Hidden Characters

Post by Leesha »

Hi Hans!
I hope you had a great vacation!! I have asked the user to send me a printscreen then next time they get an error. It has something to do with the formatting of the email address. When we look at the address it is fine so I'm not sure what the issue is. In the past when I've had problems with a filter etc. there have been times when you found hidden characters or spaces at the end of text in a cell that I couldn't "see" and I'm wondering if that is the issue. It's just a guess. I have no idea how hidden characters would end up in the field. I'm shooting in the dark with this.
Leesha

User avatar
HansV
Administrator
Posts: 78391
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Hidden Characters

Post by HansV »

Thanks, I had a very good vacation!

Let's hope that the user will get a good screenshot, and that it'll provide a clue.
Best wishes,
Hans

Leesha
BronzeLounger
Posts: 1484
Joined: 05 Feb 2010, 22:25

Re: Hidden Characters

Post by Leesha »

Hi Hans,
Glad to hear it was a good vaction! You were missed!

They have not had an error today to send me a printscreen, but in the meantime I thought I'd send you an example of what I mean by either hidden characters, spaces etc. In this example [last_name] and [first_name] look fine until I join them and then the big space after the last letter in [last_name] shows. When I use the trim function that you gave me years ago, it goes away:
Trim([last_name])&", "&trim([first_name]). I'm wondering if something like this is going on with the email?
Leesha
You do not have the required permissions to view the files attached to this post.

User avatar
HansV
Administrator
Posts: 78391
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Hidden Characters

Post by HansV »

How are the names entered into the database? Are they imported from another system? Access itself doesn't allow trailing spaces after a text field.
Best wishes,
Hans

Leesha
BronzeLounger
Posts: 1484
Joined: 05 Feb 2010, 22:25

Re: Hidden Characters

Post by Leesha »

This sample is from the software that we run where I work. I attache to the sql tables via Access to run custom reports. The DB having the issue with the emails is an Access DB connecting to sql tables.

User avatar
HansV
Administrator
Posts: 78391
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Hidden Characters

Post by HansV »

Apparently the software includes spaces after the text values. You might try using Trim for the e-mail addresses too.
Best wishes,
Hans