Hmmm... try fixing your code to see if it wakes it up. Note, since you're working with dates and not times as well, you don't need the Now() function, you just need the Date() function. Also, you didn't pass anything out of the function.
Option Compare Database
Public Function IsPast(DateSource as Date) As String
Dim IsCurrent as String
If DateSource <= Date() Then
IsCurrent = "Yes"
Else
IsCurrent = "No"
End If
IsPast = IsCurrent
End Function
---------------------
Because there is a built-in Access function called Date(), you need to change the name of your field in SalesTaxTransactions from Date to something else, e.g. TransactionDate. If not, it will confuse the computer and cause errors.
SELECT SalesTaxTransactions.TransactionDate, IsPast([TransactionDate]) AS Past
FROM SalesTaxTransactions;
__________________
Greg Serrano
Michigan Dept. of Environmental Quality
Air Quality Division
|