Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    ryanmce92 is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2015
    Posts
    48

    Emailing a completed form

    Hi There I have a table called tblcostings

    It is created when when we have a new customer we have to do a costing for them, the costing basically works out how much we should be charging for an item.



    Each costing has to be approved by our CEO, as there are several costings uploaded per day using a form is it possible to have this completed form emailed to him and then have a check box at the bottom where he can either accept or reject the costing.

    Any help on this topic would be brilliant, if there is VBA involved please tell me exactly where to put it as I am new to the coding side of things.

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    Try this:
    DoCmd.SendObject acSendForm, "frmMyForm", acFormatPDF, "George@VandelayIndustries.com", , , "form to send", "this form"

  3. #3
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    The PDF will include every record of the form's RecordSource so the form would have to be filtered to the one record.
    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.

  4. #4
    ryanmce92 is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2015
    Posts
    48
    Quote Originally Posted by June7 View Post
    The PDF will include every record of the form's RecordSource so the form would have to be filtered to the one record.
    How would I filter it to the one record?

  5. #5
    nick404's Avatar
    nick404 is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    May 2015
    Location
    Wisconsin
    Posts
    352
    Use the Filter button in the Ribbon. Looks like a gray funnel. What do you want to filter on?

    Also put code behind a button on your form or something similar (could just put it in a textbox's 'On Click' if you wanted)

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Reports are better vehicle for outputting data.

    As nick said, can use the intrinsic filter/search tools on the ribbon or right click shortcut. Or build your own, review http://www.allenbrowne.com/ser-62.html.
    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.

  7. #7
    ryanmce92 is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2015
    Posts
    48
    Basically I don't want my users to have to access any other buttons than a button that would send the form via email, I'm trying to limit access to the ribbon as much as possible because if there is a way to delete data they will manage to find it

  8. #8
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Still need some means to filter the records otherwise they will all be included in the PDF. Users make choices for filter criteria then click button.
    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.

  9. #9
    ryanmce92 is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2015
    Posts
    48
    Ok I'll see what I can do with it, thanks for all your help!!

    Just on a side note what would be the best way to describe to users how to filter, should I create a button on the form or do you think that a button on the ribbon would suffice?

    Sorry for the barrage of questions but I really want to get this right first time, is it possible to put a password on a check box?. So that only that a certain user can check the approval of the costing?. Using an input box or something similar?

  10. #10
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    I disable ribbon, right click shortcut menu, function keys and hide the navigation pane. So I build custom search as demonstrated in the link provided in earlier post.
    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.

  11. #11
    ryanmce92 is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2015
    Posts
    48
    Quote Originally Posted by June7 View Post
    I disable ribbon, right click shortcut menu, function keys and hide the navigation pane. So I build custom search as demonstrated in the link provided in earlier post.
    I have used the searching before and found it a handy tool to have however, my costing sheet has around 50 fields, is there a way to generate a report to show only the costings which match certain criteria i.e. the autonumber ID? If so then can I generate an autoemail once someone has completed a costing which sends the "ID" to the apropriate person to be approved or declined?.

  12. #12
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Certainly.

    If all you need to do is send the ID for one record, simply:

    DoCmd.SendObject , , , "email address here", , , "Costing Review", "Indicate approval or decline costing ID: " & Me!ID

    If you want to send other data from the form's current record, concatenate as shown for ID.

    Research the SendObject method for more info.
    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.

  13. #13
    ryanmce92 is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2015
    Posts
    48
    If I send the ID then the CEO can use the filter search option at the bottom of the form to search for the ID, cheers for all your help, its been great!!

  14. #14
    ryanmce92 is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2015
    Posts
    48
    Quote Originally Posted by June7 View Post
    Certainly.

    If all you need to do is send the ID for one record, simply:

    DoCmd.SendObject , , , "email address here", , , "Costing Review", "Indicate approval or decline costing ID: " & Me!ID

    If you want to send other data from the form's current record, concatenate as shown for ID.

    Research the SendObject method for more info.
    Just trying this out here June7, how do I concatenate for more fields to be included in the email message, I've tried several things but can't seem to figure it out, I'd actually like it to send each taking a new line e.g
    Costing ID: 7
    Customer Name: Test Customer
    Staff Name: John Smith

  15. #15
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    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.

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 09-17-2014, 04:40 PM
  2. Replies: 4
    Last Post: 01-16-2013, 12:33 PM
  3. Replies: 2
    Last Post: 08-02-2011, 07:25 AM
  4. Replies: 2
    Last Post: 02-03-2011, 12:41 PM
  5. Emailing a form
    By bailey537 in forum Programming
    Replies: 0
    Last Post: 07-16-2009, 03:45 AM

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