Check email address spelling

B

Bobby

Dear All

How to check email address spelling that user have input in a text box in a
form (not in table/datasheet )

Thanks
 
G

Guest

Hi Bobby

I can't see how that would be possible.

eg.
(e-mail address removed)
(e-mail address removed)
(e-mail address removed)

they may all be correct e mail addesses.

Do you have some criteria that may filter the possblities??
 
B

Bobby

My intention is to avoid user to write email addresses like :
(e-mail address removed) or
(e-mail address removed)
(notice the upper case letter)

or like noone@ theweb.com
(notice that a space after the "@")

I don't need to verify the existence of the email address, just the
spelling.

Thanks
 
L

Linq Adams via AccessMonster.com

This begs the question "Why?" Whether part of the address is capitalized
makes no difference in an email address.
My intention is to avoid user to write email addresses like :
(e-mail address removed) or
(e-mail address removed)
(notice the upper case letter)

or like noone@ theweb.com
(notice that a space after the "@")

I don't need to verify the existence of the email address, just the
spelling.

Thanks
[quoted text clipped - 16 lines]

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000

Message posted via AccessMonster.com
 
L

Linq Adams via AccessMonster.com

If you're running ACC2000 or later, you can check the entered address and
remove spaces with the Replace function:

EmailAddress = Replace(EmailAddress," ", "")

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000

Message posted via AccessMonster.com
 
D

Douglas J. Steele

You can use the LCase function to convert whatever was input into strictly
lowercase.

You can use the Replace function to remove any internal spaces.

In other words, try the following in the AfterUpdate event of the control:

Private Sub txtEmailAddress_AfterUpdate()

Me.txtEmailAddress = LCase(Replace(Me.txtEmailAddress, " ", ""))

End Sub
 
G

Guest

following on from Douglas's suggestion, another idea would be to prevent non
"e mail address" items such as " ' * > etc etc. Something like this should
work.

Private Sub EmailAddress_KeyPress(KeyAscii As Integer)
If KeyAscii = vbKeySpace Or KeyAscii = Asc("'") Or KeyAscii = Asc(">") Or
KeyAscii = Asc("*") Then
KeyAscii = 0
End If
End Sub


You will need to address the items you want to exclude (I have put in a few
to show you how it works

Good luck
 
G

Guest

Great, those codes works the way that I want.
But it lead me to another question (I don't know if it's consider as new
question or not, i'm a newbie to this discussion).
In another discussion with my friend (who studied php),he said that PHP had
a script to check an input from a user if it not contains character that an
email address require, such as "@" character. The script is :

(!txtEmailAddress( "^[_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,3}$",
$emailhp)
the first part (before the plus (+) sign indicate the user name, and the
part after it indicate the web server name. If the second part doesn't
contains the "@" char, it would lead to another script that notify the user
name to fix the email address he wrote.

The codes that Mr.Wayne-I-M, Mr.Steele, and Mr. Adams wrote helps me to
solve the first part and some of the second part.

Anyway...
With the same way that Mr. Wayne's codes, I could try some codes to solve
the "@" char, and I will write to this discussion soon after I find the
answer.
Or maybe anyone could help with this one.

Thanks

Cheers

Bobby
 
D

Douglas J. Steele

What your friend's given you is a Regular Expression that can be used to
validate e-mail addresses.

See http://www.mvps.org/access/modules/mdl0063.htm at "The Access Web", or
my October, 2003 "Access Answers" column in Pinnacle Publication's "Smart
Access" for how to use Regular Expressions in Access. (You can download my
column, and sample database, for free from
http://www.accessmvp.com/djsteele/SmartAccess.html)

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Bobby said:
Great, those codes works the way that I want.
But it lead me to another question (I don't know if it's consider as new
question or not, i'm a newbie to this discussion).
In another discussion with my friend (who studied php),he said that PHP
had
a script to check an input from a user if it not contains character that
an
email address require, such as "@" character. The script is :

(!txtEmailAddress( "^[_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,3}$",
$emailhp)
the first part (before the plus (+) sign indicate the user name, and the
part after it indicate the web server name. If the second part doesn't
contains the "@" char, it would lead to another script that notify the
user
name to fix the email address he wrote.

The codes that Mr.Wayne-I-M, Mr.Steele, and Mr. Adams wrote helps me to
solve the first part and some of the second part.

Anyway...
With the same way that Mr. Wayne's codes, I could try some codes to solve
the "@" char, and I will write to this discussion soon after I find the
answer.
Or maybe anyone could help with this one.

Thanks

Cheers

Bobby


Wayne-I-M said:
following on from Douglas's suggestion, another idea would be to prevent
non
"e mail address" items such as " ' * > etc etc. Something like this
should
work.

Private Sub EmailAddress_KeyPress(KeyAscii As Integer)
If KeyAscii = vbKeySpace Or KeyAscii = Asc("'") Or KeyAscii = Asc(">") Or
KeyAscii = Asc("*") Then
KeyAscii = 0
End If
End Sub


You will need to address the items you want to exclude (I have put in a
few
to show you how it works

Good luck
 
G

Guest

http://www.accessmvp.com/djsteele/SmartAccess.html)
Great and very useful articles.... what happens to the remains of the months
(from may 2006 till now)?
....now I really need a bit more time to study it.... :)

Bobby


Douglas J. Steele said:
What your friend's given you is a Regular Expression that can be used to
validate e-mail addresses.

See http://www.mvps.org/access/modules/mdl0063.htm at "The Access Web", or
my October, 2003 "Access Answers" column in Pinnacle Publication's "Smart
Access" for how to use Regular Expressions in Access. (You can download my
column, and sample database, for free from
http://www.accessmvp.com/djsteele/SmartAccess.html)

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Bobby said:
Great, those codes works the way that I want.
But it lead me to another question (I don't know if it's consider as new
question or not, i'm a newbie to this discussion).
In another discussion with my friend (who studied php),he said that PHP
had
a script to check an input from a user if it not contains character that
an
email address require, such as "@" character. The script is :

(!txtEmailAddress( "^[_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,3}$",
$emailhp)
the first part (before the plus (+) sign indicate the user name, and the
part after it indicate the web server name. If the second part doesn't
contains the "@" char, it would lead to another script that notify the
user
name to fix the email address he wrote.

The codes that Mr.Wayne-I-M, Mr.Steele, and Mr. Adams wrote helps me to
solve the first part and some of the second part.

Anyway...
With the same way that Mr. Wayne's codes, I could try some codes to solve
the "@" char, and I will write to this discussion soon after I find the
answer.
Or maybe anyone could help with this one.

Thanks

Cheers

Bobby


Wayne-I-M said:
following on from Douglas's suggestion, another idea would be to prevent
non
"e mail address" items such as " ' * > etc etc. Something like this
should
work.

Private Sub EmailAddress_KeyPress(KeyAscii As Integer)
If KeyAscii = vbKeySpace Or KeyAscii = Asc("'") Or KeyAscii = Asc(">") Or
KeyAscii = Asc("*") Then
KeyAscii = 0
End If
End Sub


You will need to address the items you want to exclude (I have put in a
few
to show you how it works

Good luck




--
Wayne
Manchester, England.



:

You can use the LCase function to convert whatever was input into
strictly
lowercase.

You can use the Replace function to remove any internal spaces.

In other words, try the following in the AfterUpdate event of the
control:

Private Sub txtEmailAddress_AfterUpdate()

Me.txtEmailAddress = LCase(Replace(Me.txtEmailAddress, " ", ""))

End Sub

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


My intention is to avoid user to write email addresses like :
(e-mail address removed) or
(e-mail address removed)
(notice the upper case letter)

or like noone@ theweb.com
(notice that a space after the "@")

I don't need to verify the existence of the email address, just the
spelling.

Thanks

Hi Bobby

I can't see how that would be possible.

eg.
(e-mail address removed)
(e-mail address removed)
(e-mail address removed)

they may all be correct e mail addesses.

Do you have some criteria that may filter the possblities??

--
Wayne
Manchester, England.



:

Dear All

How to check email address spelling that user have input in a text
box
in a
form (not in table/datasheet )

Thanks
 
G

Guest

I did read every single word in that site carefully, in fact I read it again
after I read your reply to my earlier mail.

I'm sorry if I didn't mentioned it correctly, I mean where did the remains
of the monthly articles of yours after that newsletter were purchased by Eli
Journals. Did you had another column somewhere else ? Coz if you do, I like
to read it.

"That means I have no more columns to be able to repost at this site"

So it means that you had another column in other site(s).


Bobby
 
D

Douglas J. Steele

Sorry for the misunderstanding.

I've been writing for Access Advisor for some time now. Unfortunately, the
terms of my agreement with Advisor Media don't allow me to post my articles
(while I own the rights to my code, they own the rights to the articles),
and you need to be a subscriber to read them on the Advisor site. However,
they recently suggested that they might be able to make my articles
available to the public after a certain amount of time.

Keep checking my website: I'll have links to the Advisor articles if/when
they become available. Meanwhile, the following one is already public:
http://my.advisor.com/doc/16279
 
G

Guest

Sorry for the misunderstanding.

Never mind...
I've been writing for Access Advisor for some time now. Unfortunately, the
terms of my agreement with Advisor Media don't allow me to post my articles
(while I own the rights to my code, they own the rights to the articles),
and you need to be a subscriber to read them on the Advisor site. However,
they recently suggested that they might be able to make my articles
available to the public after a certain amount of time.

Keep checking my website: I'll have links to the Advisor articles if/when
they become available. Meanwhile, the following one is already public:
http://my.advisor.com/doc/16279

Last time I check, it's not available yet. I'm looking forward to it...
 

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

Similar Threads

spell checker 10
Spell check on access with out message box 3
spell check 4
Check Spelling in Datasheet Subform 1
spell check 1
spell checker gone wild! 1
Spell Check 3
spell check entire database 3

Top