Results 1 to 3 of 3

If Statement in on current not producting required results?

  1. #1
    d9pierce1 is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Jan 2012
    Location
    Tennessee
    Posts
    140

    If Statement in on current not producting required results?


    Members - Update - Copy.zip

    Good morning all,
    I have a form "EventFrm" and I have put this code in the on current event.
    Code:
        If TxtStartDate <= TxtToday And TxtEndDate < TxtToday Then
            Me.IsActive = True
        Else
            Me.IsActive = False
        End If
    I have tried all sorts of methods and cannot for the life of me figure out how to nest this and get it to work
    What I am attempting to do is:
    Set the value in my IsActive to True IF
    The TxtStartDate is <= todays date and If TxtEndDate is < Todays date
    And if not, set IsActive to False

    Should be simple but never the case....

    Thanks
    dave

  2. #2
    davegri is offline Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    1,916
    You need to define EndDate in the table as date/time, not short text.

  3. #3
    d9pierce1 is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Jan 2012
    Location
    Tennessee
    Posts
    140
    Thank you,

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

Similar Threads

  1. Required Crosstab Query Type Results!
    By cap.zadi in forum Queries
    Replies: 7
    Last Post: 10-14-2018, 05:46 AM
  2. Using current computer date in iif statement
    By Kusaf8 in forum Programming
    Replies: 8
    Last Post: 04-12-2016, 07:49 PM
  3. Object required error in If statement
    By monardasprite in forum Programming
    Replies: 4
    Last Post: 12-03-2015, 02:02 PM
  4. Replies: 5
    Last Post: 01-31-2013, 01:39 PM
  5. Replies: 1
    Last Post: 04-28-2012, 02:56 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
  •  
Tech Forums: Microsoft Office Forums