Results 1 to 4 of 4
  1. #1
    dniezby is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Apr 2013
    Posts
    183

    Query help to create a mobile email

    I have two tables...one table has a field, mobile number(Mobile). Once someone enters their mobile number, they will be asked to select a carrier(Carrier Name). Each carrier has an email address assigned to it. (Carrier Email)



    When my users enter a phone number, then choose their carrier, I want a link (or button) to appear on my form that will send an email to the combined data.

    So, table one - Contacts > Field1(Mobile)= mobile number
    Table 2 - Carriers > Field2(Carrier name) , Field 3 (Carrier email)

    Results should be field1@field3 based on choice of carrier.

    I suck at building queries and could really use help creating this.

    What I would like to do is have the result make visible a button with that result so that my users can click that button to send an email to that carrier.

    Thanks in advance.

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    In a macro ,SendObject
    use the email field.
    Or in VB:
    docmd.SendObject.....
    Last edited by ranman256; 12-02-2016 at 10:40 AM.

  3. #3
    dniezby is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Apr 2013
    Posts
    183
    Quote Originally Posted by ranman256 View Post
    In a macro ,SendObject
    use the email field.
    Or in VB:
    docmd.SendObject.....
    Yeah, and how in the heck do I do that?!
    I'm an intermediate at best. I can write simple macros like Save a record and go to a specific form or new record. SetProperty values based on activities or formfield data but this one is putting me at a loss.

    I did think it would be simple because all I'm doing is seeing if someone entered a mobile carrier, then adding it's email (a field NOT listed on the form) to the person's mobile number to create a usable email address.

    Should I create a SetTempVar? What about using a hidden text box where it's data = the result?

    I just don't know where to begin. Maybe I don't know where to look for examples that I could adapt.

    I know my first step is to get the result I need before I can move on to the email.

  4. #4
    dniezby is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Apr 2013
    Posts
    183
    Figured it out!!!!

    Well part of it.

    I finally figured out how to create the query that created the full email address based on the user's selection of carrier.

    Here is the SQL View of the query I made.
    Code:
    SELECT Contact.[Mobile Number], Contact.[Mobile Carrier], Carriers.[Carrier eMail], [Mobile Number] & "@" & [Carrier eMail] AS SMSEmail
    FROM Carriers INNER JOIN Contact ON Carriers.[ID] = Contact.[Mobile Carrier];
    Now on to design a table that tracks the messages sent to those emails and sending of the actual email itself.

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

Similar Threads

  1. Replies: 1
    Last Post: 11-17-2015, 05:41 PM
  2. Create Query to run automatically and email
    By murleyj in forum Access
    Replies: 6
    Last Post: 06-19-2015, 10:53 AM
  3. Replies: 5
    Last Post: 05-07-2014, 09:25 AM
  4. Create boxes in email VBA
    By cbrsix in forum Programming
    Replies: 9
    Last Post: 04-19-2013, 03:06 PM
  5. Replies: 4
    Last Post: 04-26-2012, 08:25 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