Results 1 to 4 of 4
  1. #1
    Kaloyanides is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Jan 2015
    Location
    Arlington, MA
    Posts
    51

    Smile Fill a single text box with main form and subform data... For SMS/Txt... Twilio API...

    Say a customer ordered 20 items but 3 were out of stock.



    I log those 3 items into the database.

    I figured out how to use Twilio API to send an SMS text message. I'm looking for an easy way to text the out of stock items to each customer.

    I have a main form [frmIssues_View2_Head] with the order details and a subform [frmIssues_View2_Foot] with the product details.

    I need to combine some of the header details with all of the product details into a single text box so I can then send via SMS message.

    I don't know how to do loop, end of file, programming. If that's even how this would be done.

    I'm hoping one of you geniuses could help me out...? Thx so much in advance!Click image for larger version. 

Name:	issues.jpg 
Views:	9 
Size:	142.6 KB 
ID:	48185Click image for larger version. 

Name:	issues_design.jpg 
Views:	9 
Size:	216.4 KB 
ID:	48186

  2. #2
    Kaloyanides is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Jan 2015
    Location
    Arlington, MA
    Posts
    51
    Am I on the right path? Thx..

    Click image for larger version. 

Name:	right_path.jpg 
Views:	8 
Size:	210.2 KB 
ID:	48187

  3. #3
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,861
    I would create a string variable strTwilio
    I would populate that with the header info. Lets say strTwilio = Me.[Customer Name] & " - " & Me.Category & vbCRLF
    That is the header info
    Then using the recordsetclone of the subform, move through all the records until EOF adding info for each item.
    strTwilio = strTwilio & rs!Product & ", "

    When out of recordset loop, then remove the last ", " with Left() function.
    Then you have the string to send via Twilio.

    Adjust the controls you need to suit.

    HTH
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  4. #4
    orange's Avatar
    orange is online now Moderator
    Windows 10 Office 365
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    Further to Welshgasman's response, although you enter those 3 out of stock items to the database, does it trigger a reorder message/transaction to the supplier? Is there any option in the Customer order process to offer/suggest alternative items if a requested item is out of stock?
    I'm just suggesting these for consideration.

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

Similar Threads

  1. Replies: 1
    Last Post: 08-03-2016, 10:41 AM
  2. Fill field in subform with main form ID
    By bkaren1203 in forum Forms
    Replies: 1
    Last Post: 09-01-2014, 11:01 AM
  3. Replies: 2
    Last Post: 03-21-2014, 10:40 AM
  4. Replies: 6
    Last Post: 09-10-2012, 07:19 AM
  5. Replies: 3
    Last Post: 01-18-2012, 03:05 AM

Tags for this Thread

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