Results 1 to 4 of 4
  1. #1
    oppoiste0731 is offline Novice
    Windows XP Access 2010 64bit
    Join Date
    Dec 2017
    Posts
    1

    How to output data from multiple choice


    Creating a page for users to find information by clicking a button use as an Email, TEL, MOBILE , But there is the constraint in multiple option fields at "Group" It has plenty of options for users to choose at least 1-6 options in a row
    because of some client assigned in specific group.
    Attached Thumbnails Attached Thumbnails test.jpg  

  2. #2
    Minty is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,002
    I'm confused as to what your question is?

  3. #3
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,523
    if the user can pick more than 1 method, would you want to send data to ALL devices? or just 1?

    if you are sending to all , cycle thru each checked item then send it, like:


    Code:
    Public Sub btn_test_Click()
    Dim rst
    dim vMethod, vID
    
    
    Set rst = CurrentDb.OpenRecordset("qsContactResults")
    
    
    With rst
        While Not .EOF
             vID = .Fields("ID").Value & ""
             vMethod = .Fields("Contact").Value & ""
             SendViaMethod vID, vMethod  
            
            .MoveNext
        wend
        .Close 'Close the recordset
    End With
    Set rs = Nothing 'Clean up
    End Sub
    
    
    
    
    sub SendViaMethod(byval pvID, byval pvMethod)
    
    
    select case pvmethod
       case "Email"  
           sTo  = Dlookup("[email]","tContacts","[id]=" & pvid)
           docmd.SendObject acSendReport ,"rMyReport",acFormatPDF,sTo,,,sSubj,sBody
    
    
       case "TEL"
          'send to TEL
    
    
       CASE "Mobile"
           'send to phone
    end select
    end sub

  4. #4
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    From the image in Post #1, it looks like you have multi-value FIELDS in your tables. Most experienced Access developers do not use MVFs.

    Some suggestions:
    Use only letters and numbers (exception is the underscore) for object names.
    Do not use spaces, punctuation or special characters in object names.
    Do not use look up FIELDS, multi-value fields or calculated fields in tables.
    Do not begin object names with a number.

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

Similar Threads

  1. Replies: 3
    Last Post: 05-24-2017, 01:26 PM
  2. modify backend table
    By markjkubicki in forum Programming
    Replies: 1
    Last Post: 12-08-2014, 10:53 PM
  3. Modify D/T for Multiple Fields in the Record
    By Murphy0417 in forum Access
    Replies: 8
    Last Post: 07-02-2014, 11:40 AM
  4. Replies: 2
    Last Post: 12-14-2012, 04:08 PM
  5. Add field to table using VBA and modify it
    By snoopy2003 in forum Programming
    Replies: 5
    Last Post: 07-23-2011, 03: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