mtnsurfer22
Programmer
I have a table in Access that records the backup status of various servers. The table is updated daily. I want to create a summary form that will show the past 7 days as column headings and each server as row headings. The status (successful/unsuccessful) will then be displayed in the data of the chart. I have created this table manually using label boxes. (This seemed a bit tedious but I could not figure another way to do it, I only have 6 machines so it is only a 6 X 7 table). I was going to use VBA (using a variable array) to fill in the data of the table as captions to my labels. My problem is that I am setting the caption of the column headings using...
Private Sub Form_Load()
Me("lblDate6").Caption = Date - 6
Me("lblDate5").Caption = Date - 5
Me("lblDate4").Caption = Date - 4
Me("lblDate3").Caption = Date - 3
Me("lblDate2").Caption = Date - 2
Me("lblDate1").Caption = Date - 1
Me("lblDate").Caption = Date
End Sub
This was working fine when I first created it...now however, (a few weeks later) the date is still returning the old date. The calculations work fine, but it seems to think that "Date" is 4/11/2004, instead of my current system time.
The Date() statement still works fine in Queries. Also, if I create a new blank database, the Date statement works correctly. Yet, I cannot get the VBA code in my current database to realize that it is not still 4/11/2004.
What am I missing here?
Thanks
Private Sub Form_Load()
Me("lblDate6").Caption = Date - 6
Me("lblDate5").Caption = Date - 5
Me("lblDate4").Caption = Date - 4
Me("lblDate3").Caption = Date - 3
Me("lblDate2").Caption = Date - 2
Me("lblDate1").Caption = Date - 1
Me("lblDate").Caption = Date
End Sub
This was working fine when I first created it...now however, (a few weeks later) the date is still returning the old date. The calculations work fine, but it seems to think that "Date" is 4/11/2004, instead of my current system time.
The Date() statement still works fine in Queries. Also, if I create a new blank database, the Date statement works correctly. Yet, I cannot get the VBA code in my current database to realize that it is not still 4/11/2004.
What am I missing here?
Thanks