Update query Formatting

  • Thread starter Thread starter Dave
  • Start date Start date
D

Dave

I am trying to populate a new field in the DB with parts of several other
fields but am having some formatting issues

Here is my update code:

=[FirstName] & [LastName] & Mid([studentid],6,4) & "@xxxx.com"

Here are my issues
1. I need this to be all lower case (I tried Lower([FirstName]) but no luck)
2. Some of the names have spaces and hyphens. Can they me removed in the
update? Hyphens removal is less important but the spaces need to go. "Trim"
does not work because these are not always Leading spaces.


Thanks

dave


__________ Information from ESET NOD32 Antivirus, version of virus signature database 4515 (20091016) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
 
Try this --
=LCase(Replace(Replace(([FirstName] & [LastName] & Mid([studentid],6,4) &
"@xxxx.com"), " ",""), "-", ""))
 
Try

=Lcase(replace([FirstName]," ","")) & " " & Lcase(replace([LastName]," ","))
& Mid([studentid],6,4) & "@xxxx.com

Regards

Kevin
 
Thank you both.

Dave

Dave said:
I am trying to populate a new field in the DB with parts of several other
fields but am having some formatting issues

Here is my update code:

=[FirstName] & [LastName] & Mid([studentid],6,4) & "@xxxx.com"

Here are my issues
1. I need this to be all lower case (I tried Lower([FirstName]) but no
luck)
2. Some of the names have spaces and hyphens. Can they me removed in the
update? Hyphens removal is less important but the spaces need to go.
"Trim" does not work because these are not always Leading spaces.


Thanks

dave

__________ Information from ESET NOD32 Antivirus, version of virus
signature database 4515 (20091016) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com

__________ Information from ESET NOD32 Antivirus, version of virus signature database 4515 (20091016) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
 
Back
Top