E-mail field

NJBuckeye

Registered User.
Local time
Today, 10:52
Joined
Jun 27, 2008
Messages
10
I'm doing a database and have a table listing employee info. Our company assigns e-mail addresses based on name: mickey.mouse@disney.com

If 2 people have the same name, it is modified to include a middle name or initial, or even Dave instead of David, but for the most part. first and last.

So, 2 questions.

1. For the e-mail field, is hyperlink, or text the proper form (I can't find an answer to this question anywhere, even though it seems pretty simple... I'm leaning toward text).

2. Can I have the e-mail automatically created?

I tried having the default value in the table be =TRIM([firstname]&"."&[lastname]&"@company.com") but I receive a message that the field names (firstname and lastname) aren't recognized.

I know I could have a query do it, but it would make life easier if it could be done in the original table, reducing the queries that are to come. Also, the problem with a query is that it would then erase the exceptions (mickey.the.mouse@disney.com).

Of course, simply typing it is an answer, as is having the name typed, and adding @company.com in a query, but would just really prefer to avoid the query if possible.

Thanks.

NJBuckeye
 
I use text for mine. One problem with that default value is it would get populated before you entered a first and last name, so it would be useless anyway. I'd probably put code on the form where new entries were made, probably in the after update event of whichever of those controls would normally be entered last. I would only run it if the email address was empty, so you wouldn't overwrite your exceptions.
 
Unless you're using Acc2007, then you'll want to either use a Text datatype for your emial field or ensure that you *only* enter the email addressed via code.
Prior to 2007 - hyperlink fields would always have "http://" prefixed to the entered value which inevitably sees the address opened as if any web link.
You could form the address and prefix it with "mailto:" in code and you'd be fine - or as Paul says - just go with text and do it all yourself.
 

Users who are viewing this thread

Back
Top Bottom