help with lcase function.

M

Mabeline

I have setup a field on a form so that a user can enter their email address
and I want to ensure that it converts all of the characters entered to
lowercase because this field is linked to outlook. Access help is not very
helpful here.

I went to the properties of the email field in the form and under event I
have chosen afterupdate as well as on enter (at different times) and selected
the event procedure option. Also tried just selecting code builder. Then
entered the code as follows:

email_AfterUpdate or email_Enter (this is created by the system)
Dim UpperCase, LowerCase
UpperCase = (name of the field on the form)
LowerCase = Lcase(UpperCase)
End Sub (I got this procedure wording from Microsofts' website)

I have also tried just entering the following code:

email_AfterUpdate (this is created by the system)

LCase([email])

End Sub

This doesn't work either.

Can someone tell me why this doesn't convert the data entered to lower case
in the database? When I view the data afterwards it is still in uppercase.

If you think that this is too simple then please make your responses simple
because it must mean I don't understand things very well.

I am using Access 2003.

Thanks in advance.


Mabeline.
 
M

Mabeline

Al Campagna, This Worked just as you said it would thank you very much.


Mabeline.

Al Campagna said:
Mabeline,

Private Sub EMail_AfterUpdate()
= LCase([EMail])
End Sub

Should do it..
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html
"Find a job that you love... and you'll never work a day in your life."

[QUOTE="Mabeline"]
I have setup a field on a form so that a user can enter their email address
and I want to ensure that it converts all of the characters entered to
lowercase because this field is linked to outlook. Access help is not very
helpful here.

I went to the properties of the email field in the form and under event I
have chosen afterupdate as well as on enter (at different times) and
selected
the event procedure option. Also tried just selecting code builder. Then
entered the code as follows:

email_AfterUpdate or email_Enter (this is created by the system)
Dim UpperCase, LowerCase
UpperCase = [email] (name of the field on the form)
LowerCase = Lcase(UpperCase)
End Sub (I got this procedure wording from Microsofts' website)

I have also tried just entering the following code:

email_AfterUpdate (this is created by the system)

LCase([email])

End Sub

This doesn't work either.

Can someone tell me why this doesn't convert the data entered to lower
case
in the database? When I view the data afterwards it is still in uppercase.

If you think that this is too simple then please make your responses
simple
because it must mean I don't understand things very well.

I am using Access 2003.

Thanks in advance.


Mabeline.[/QUOTE]
[/QUOTE]
 

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

Top