Results 1 to 3 of 3
  1. #1
    reubendayal is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Feb 2015
    Location
    Denmark
    Posts
    18

    Edit a record with a macro attached to a button

    Hi All,



    This is a basic question that I have been trying to find a solution for but nothing has worked so far.

    I have created a form with a custom format to arrange the form fields to look like a report (to manage my casework). Anyway, I have a basic conditional formatting rule that highlights each case (lined up in a row of all fields) if that case was last last modified more than 3 days ago. And I've created another field that with the same data repeating for each case and have made it look like a button. Now I am trying to assign a 'On Click' event to it that would simply edit the respective Date-Modified field to today's date.

    But I've tried linking that button to an expression builder function and tried a few macro options too..but am unsuccessful.

    Please can you suggest what can be a simple macro to use when I click the button on that specific case that would simply edit the Date-Modified field to todays date.

    Secondly, I would like to create just one dedicated button and attach a Macro to it to turn on/off the Conditional Formatting rule.

    Any suggestions will be greatly appreciated.

    Thanks
    Reuben

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,527
    the on click code:

    txtBox = Date()

  3. #3
    reubendayal is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Feb 2015
    Location
    Denmark
    Posts
    18
    Thanks ranman256.

    I used the SetValue macro instead and used it correctly this time! So it worked.

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

Similar Threads

  1. Replies: 3
    Last Post: 10-02-2015, 07:58 PM
  2. Saving a Record Edit ONLY if button is clicked?
    By McArthurGDM in forum Forms
    Replies: 3
    Last Post: 06-01-2015, 09:33 PM
  3. Replies: 6
    Last Post: 11-24-2014, 03:55 AM
  4. Replies: 5
    Last Post: 11-06-2013, 02:49 PM
  5. Replies: 1
    Last Post: 05-31-2013, 08:53 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