I have a database that tracks food purchased and the price of the item. Monthly I run a report that tells me how much I spent on the food items purchased so I can budget my expenses. This report was running fine in Access 2007 until today when I upgraded to Access 2010. Now I am receiving an error code 438 when trying to run the report. "Object doesn't support this property or method". Then it gives me the option to debug.
Option Compare Database
Option Explicit
Private Sub cmdFinish_Click()
txtFinish = ctlCalendar.Month & "/" & ctlCalendar.Day & "/" & ctlCalendar.Year
End Sub
Private Sub cmdOK_Click()
If IsNull(txtStart) Or IsNull(txtFinish) Or IsNull(Catagory) = True Then
MsgBox "You must fill in all required fields, Dumb Ass!", vbCritical
Exit Sub
End If
If LenB(txtFinish) = 0 Or LenB(txtStart) = 0 Then
MsgBox "Both Start and Finish dates must be filled.", vbCritical
Exit Sub
End If
If CDate(txtFinish) < CDate(txtStart) Then
MsgBox "The Finish date cannot be before Start date.", vbCritical
Exit Sub
End If
Form.Visible = False
End Sub
Private Sub cmdStart_Click()
txtStart = ctlCalendar.Month & "/" & ctlCalendar.Day & "/" & ctlCalendar.Year
End Sub
Private Sub Form_Load()
With ctlCalendar
.Day = Day(Now())
.Month = Month(Now())
.Year = Year(Now())
.Visible = True
End With
End Sub
I bolded the area that is in yellow on the debug screen. .Day=Day(Now()). Can someone help me resolve this issue so I can run the report. If more information is needed I will post it.....