Consulting

Results 1 to 5 of 5

Thread: Run code only if 2 conditions are true

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    VBAX Contributor
    Joined
    Jul 2011
    Location
    Manchester
    Posts
    142
    Location

    Run code only if 2 conditions are true

    Hi

    Just trying a more complex database (for me anyway) and needsome advice if anyone can help please?
    I need to run a piece of code only if a couple of conditionsapply 1) The Incident Closed box is checked and 2) There is a date in the DateClosed box but completely stuck and tried a few examples from the net butgetting nowhere.
    I am just using a msgbox to test where my code would andthis is what I am trying
    “ If Closed = TrueThen
    Dim udate As Date
    udate ="01/01/2000"
    IfIncident_Closed.Value > udate Then
    MsgBox("TEST")
    End If
    End If”
    I have also attached a screenshot of the part of the form I amtrying to get working. Basically thedays to close would display a number when I run the code (replacing the messagebox I am trying to test with”

    Thank you for any advice.
    Mykal
    Attached Images Attached Images

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •