ryanturner
New member
- Local time
- Today, 08:42
- Joined
- Jul 21, 2011
- Messages
- 3
Hey I'm an intern and the company I'm working for has me designing a database of their inventory. One of my reports has all of their computers with info on them. I have the date they were purchased and want to write code so that if the purchase was over 4 years ago the the text will turn red... after attempting to learn access, vb code, and a jist of C# in the past week and a half this is what I got and it isn't working... My co-workers have taken a look at it but its been so long sense they have used VB themselves they cant really understand what the problem is...
Private Sub Report_Current()
Dim Date1 As Date
Date1 = Report_ComputerReport.DateBought
If DateDiff("yyyy", Now, Date1) > 4 Then
DateBought.ForeColor = vbRed
End If
End Sub
ANY help would be greatly appreciated...
Private Sub Report_Current()
Dim Date1 As Date
Date1 = Report_ComputerReport.DateBought
If DateDiff("yyyy", Now, Date1) > 4 Then
DateBought.ForeColor = vbRed
End If
End Sub
ANY help would be greatly appreciated...