Forum Discussion

Tony2021's avatar
Tony2021
Iron Contributor
Apr 17, 2022
Solved

AfterUpdate and If statement

Hello Experts,    I need a msgbox to appear if the date I enter [FundingDate] equals any of the values in qryHolidays.Date.  I get an Object Required error.  I am not sure where the error is?   t...
  • arnel_gp's avatar
    Apr 17, 2022
    you can use DLookup:

    If DCount("1", "qryHolidays", "Date = " & Format$(Me.FundingDate, "\#mm\/dd\/yyyy\#")) <> 0 Then
    MsgBox "Holiday", vbInformation
    End If

Resources