I'm trying to write code to compare the values from two list boxes but I get an invalid use of null error. Here's my set up. I have tblSignIn with fields of EmpID(PK), SignInDate, TicketNo, StatusID,StartDate,TermDate. I have created two queries, qryStartDate finds the latest StartDate(I used the Max function on the field StartDate) and qrySignIn finds the latest Sign In Date(Again I used the Max function on the SignInDate field). Then I created two list boxes and populated these with the respective query. When I run my form the list boxes show the correct dates. In the on current event of my form I qrote:
dim StartDate as date
Dim SignInDate as date
StartDate=me.lstStartDate
SignInDate = me.lstSignInDate
When I run my form, I get the error,"invalid use of null".
I tried using the column count but it didn't help. When I place my mouse cursor over the first variable, it says 12:00 AM. ??? Basically I'm trying to compare these two dates to see which is the latest and then display a message on my form. Also, is there a way to populate a textbox based on these queries?
Thanks Jim
dim StartDate as date
Dim SignInDate as date
StartDate=me.lstStartDate
SignInDate = me.lstSignInDate
When I run my form, I get the error,"invalid use of null".
I tried using the column count but it didn't help. When I place my mouse cursor over the first variable, it says 12:00 AM. ??? Basically I'm trying to compare these two dates to see which is the latest and then display a message on my form. Also, is there a way to populate a textbox based on these queries?
Thanks Jim