Results 1 to 3 of 3
  1. #1
    sanjayakalpage is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Jan 2015
    Posts
    5

    Comparing date field and trigger action when button clicked

    Dear Friends,

    I have a table to store "issues" with fields Issue name(text), target date(date) and status (combo box-active & pending statuses). default status for new issue is active. when clicking a button i want to change the status of every record to "pending" status (combo box value should be pending) if the target date<current date. I am new to access and kindly request your help. Thank u....

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,926
    Could build and run an Access UPDATE query object.

    Or in VBA, maybe:

    CurrentDb.Execute "UPDATE tablename SET status = 'pending' WHERE [target date]<Date()"
    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.

  3. #3
    sanjayakalpage is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Jan 2015
    Posts
    5
    It worked.... Thank u

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

Similar Threads

  1. Replies: 2
    Last Post: 06-03-2014, 12:12 PM
  2. Button OnClick to trigger Query results
    By rhubarb in forum Programming
    Replies: 9
    Last Post: 05-18-2014, 10:38 AM
  3. how to trigger a button event at same form
    By newaccess in forum Forms
    Replies: 10
    Last Post: 03-01-2013, 10:02 AM
  4. Trigger event with button click
    By AMAS in forum Forms
    Replies: 8
    Last Post: 06-07-2012, 09:42 AM
  5. disabling an enabled button that has been clicked.
    By aaron47 in forum Programming
    Replies: 3
    Last Post: 08-26-2011, 09:49 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