Page 3 of 3 FirstFirst 123
Results 31 to 33 of 33
  1. #31
    hawzmolly is offline Advanced Beginner
    Windows 10 Access 2010 32bit
    Join Date
    Oct 2008
    Location
    Green Bay, WI
    Posts
    77
    Thank you June and all the other forum members. I changed the one symbol and tried the code on my sample DB. The first time it changed the "Current" field from No to Yes so I changed the ">" to "<" in the code and it worked. I added several more entries with various " DuesDue" dates. Now when I open the DB the corrections are made. Hallelujah!



    The code in "OnLoad" is CurrentDb.Execute "UPDATE Members SET [Current] = Date() < DuesDue;" Don't know why it has to be < but now it changes the "Current" field from Yes to No (Checked to Unchecked).

  2. #32
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,962
    A 'checked' value is -1/True/Yes and 'unchecked' is 0/False/No. You want the field to be checked (meaning 'Member is Current') only if the current date is less than the DuesDue date. So you are correct to use <. I should have done some more testing of the expression.

    If DuesDue date is Aug 2 2019 then Date() (Mar 5 2019) < DuesDue and should register as True in field. I hope that is representative of the results you are getting.
    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. #33
    hawzmolly is offline Advanced Beginner
    Windows 10 Access 2010 32bit
    Join Date
    Oct 2008
    Location
    Green Bay, WI
    Posts
    77
    All I know is it is working as I wanted. Again, thank you very much.

Page 3 of 3 FirstFirst 123
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 19
    Last Post: 03-09-2017, 09:48 AM
  2. Replies: 2
    Last Post: 12-29-2016, 11:42 AM
  3. Replies: 6
    Last Post: 09-04-2014, 02:03 PM
  4. Replies: 1
    Last Post: 02-17-2013, 04:46 PM
  5. Replies: 2
    Last Post: 09-29-2012, 11:22 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