Apr 19, 2007 #1 MrsNic Instructor Feb 6, 2005 44 GB I want to compare a date with today's date and if the month is greater to put a Yes in a text box, if not no. I have tried the Iff function and DateDiff but I don't seem to be getting the syntax correct. Any help gratefully received. Cath
I want to compare a date with today's date and if the month is greater to put a Yes in a text box, if not no. I have tried the Iff function and DateDiff but I don't seem to be getting the syntax correct. Any help gratefully received. Cath
Apr 19, 2007 #2 RuralGuy Technical User Jun 27, 2002 446 US Where are you doing the comparing? In a query? In event code in a form? Does the year make any difference? HTH RuralGuy (RG for short) acXP winXP Pro Please respond to this forum so all may benefit Upvote 0 Downvote
Where are you doing the comparing? In a query? In event code in a form? Does the year make any difference? HTH RuralGuy (RG for short) acXP winXP Pro Please respond to this forum so all may benefit
Apr 19, 2007 #3 nickdel Programmer May 11, 2006 367 GB try this: Code: IIf(CDate(Me.Text1.Value) = Date, "True", "False") Cheers Nick Upvote 0 Downvote
Apr 19, 2007 #4 nickdel Programmer May 11, 2006 367 GB I should maybe expand slightly on my example!!: Code: Dim CheckIt CheckIt = IIf(CDate(Me.Text1.Value) = Date, "True", "False") Me.Text2.Value = CheckIt Cheers Nick Upvote 0 Downvote
I should maybe expand slightly on my example!!: Code: Dim CheckIt CheckIt = IIf(CDate(Me.Text1.Value) = Date, "True", "False") Me.Text2.Value = CheckIt Cheers Nick
Apr 19, 2007 #5 TheAceMan1 Programmer Sep 23, 2003 11,174 US How are ya MrsNic . . . Perhaps this: Code: [blue]= IIf(Month(CDate(Me.Text1.Value)) > Month(Date), "True", "False")[/blue] See Ya! . . . . . . Upvote 0 Downvote
How are ya MrsNic . . . Perhaps this: Code: [blue]= IIf(Month(CDate(Me.Text1.Value)) > Month(Date), "True", "False")[/blue] See Ya! . . . . . .