Property on Window is Nil

I have a date property in a window called “timeLastChecked”.

In the open event of the window, I have the following code:

dim d as New date
timeLastChecked.TotalSeconds = d.TotalSeconds

This causes a Nil Object Exception because timeLastChecked is Nil.

Not sure what could cause this?

There’s no object in the “timelastchecked” variable. Just do:

timeLastChecked = new date

Thanks. I drew a mental blank on that one.