Results 1 to 7 of 7
  1. #1
    CHEECO is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Feb 2016
    Posts
    156

    Up date form when clicking the the print email button

    I have a form where the report is completed then at the click of the email button the report is emailed. What I would like to do is add a section of code to the email button that will update the form before the report is mailed.

    Thank-you

    Cheeco

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Update with what? To change a value:

    Me.TextboxName = DesiredValue
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    CHEECO is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Feb 2016
    Posts
    156
    I want to update the form using the email button before the report is sent out by email.

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    What exactly do you mean by update the form?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    CHEECO is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Feb 2016
    Posts
    156
    What is happening now pbaldy is if the user clicks the email but with out saving first the report is blank when it get emailed. What I am asking is the when the user clicks the email button the the report gets saved first then the report gets emailed out. So what I am looking for is a piece of code to put in the email button before the send email command that will save the report first then email the report. I am sorry that I have not been very clear on what I am asking for.

  6. #6
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,954
    To force a save use
    Code:
    if me.dirty then me.dirty=false
    To update the form itself, try Me.Requery or Me.Recalc
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  7. #7
    CHEECO is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Feb 2016
    Posts
    156
    That worked great Thank-you

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

Similar Threads

  1. Replies: 4
    Last Post: 06-22-2017, 07:39 AM
  2. Replies: 3
    Last Post: 10-15-2015, 08:48 PM
  3. Replies: 2
    Last Post: 09-15-2015, 03:08 AM
  4. Replies: 8
    Last Post: 11-04-2014, 03:29 PM
  5. Replies: 5
    Last Post: 08-02-2012, 02:05 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