Results 1 to 4 of 4
  1. #1
    mwilke1978 is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Jan 2016
    Posts
    2

    How to append @email.com to a name

    I have a database that has a column for usernames. I want to create a new column called Email and run some SQL command or query that will take the username... add email.com to the end of it and place it in the email column. I think want to be able to run mail merges with that database and i know how to do that part. I just cant figure out how to append @email.com to the end of username and create a new field with the email addresses.



    PS... im a complete beginner so go easy on me lol

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    You want a Email field to be a Calculated type in table? Do concatenation:

    [username] & "@email.com"

    Is there really an email.com or is this fake just for example?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    mwilke1978 is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Jan 2016
    Posts
    2
    Quote Originally Posted by June7 View Post
    You want a Email field to be a Calculated type in table? Do concatenation:

    [username] & "@email.com"

    Is there really an email.com or is this fake just for example?

    The "email.com" is just a for example type thing. So my SQL line to add would simply be

    [username] & "@email.com"

    How does it know to populate to the new column i am dubbing "Email" ?

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    It doesn't and there is no need to. Do the calc when the string is needed.

    You can use a Calculated type field in table or do the calculation in query or in textbox ControlSource or in code (macro or VBA).

    Saving calculated data requires code (macro or VBA). Saving calculated data is usually not a good idea. Certainly is not necessary in this case.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 09-02-2015, 08:44 AM
  2. Access can't append all the records in the append query
    By fluffyvampirekitten in forum Access
    Replies: 2
    Last Post: 08-27-2015, 01:53 AM
  3. Replies: 5
    Last Post: 05-07-2014, 09:25 AM
  4. Replies: 1
    Last Post: 10-06-2011, 08:37 AM
  5. Replies: 7
    Last Post: 07-21-2011, 01:01 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums