By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,400 Members | 953 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,400 IT Pros & Developers. It's quick & easy.

Generating Emails

P: 18
Hi Everybody,

I am creating a database for auto generation of E-mails. In the database I have a master table UserMst
UserCode PK
First Name Text
Middle Name Text
Last Name Text

and another table EmailMst
UserCode FK
Email_ID Text

With a main form with basic details of the user and a subform to create the emails. User Form is the main form and EmailMst is the subform. I linked the subform with the the main form through the User code. What I want is to genetate an email as follows: First Name.Last I used the following code:
Email_ID = LCase$(([Forms]![UserMst]![First Name]) &"."& ([Forms]![UserMst]![LastName]) & "")
It works fine, but the problem arises when only initials are given it takes like (First Name..Last Secondly I want to give users an option of some suggested emails to be created. Kindly help. Thanks

Sep 11 '07 #1
Share this Question
Share on Google+
2 Replies

Expert Mod 10K+
P: 14,534
To deal with the first issue. Try the following ...

Expand|Select|Wrap|Line Numbers
  1. Email_ID = LCase$(Replace([Forms]![UserMst]![First Name], ".", "") &"."& ([Forms]![UserMst]![LastName]) & "")
Secondly I want to give users an option of some suggested emails to be created.
I don't understand what you are asking for here.
Sep 13 '07 #2

P: 18
Hi mmccarthy,

Thank you so much. The first part of my problem is solved. The second problem needs little more explanation. Suppose we take a name [Adam Smith Jones]
According to our coding email created is [], but this is one standard email. If I want to give the user some options like:,,,,
in a separate listbox and the user can choose from there.
Pls. help me in this.

Thanks and regards
Sep 13 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.