Global DB as DAO.Database
Global Msg as string
Public Function Convalida()
Dim Rs as DAO.Recordset
Set Db =Currentdb()
set Rs = db.openrecordset("TBL_Convalida")
if rs.eof=true or isnull(rs!Data_Attivazione)=true then
rs.edit
rs!data_attivazione = date
rs.update
else
'CONTROLLO CHE LA DATA DI SISTEMA NON SIA
'STATA PORTATA INDIETRO NEL TEMPO
if rs!Data_Attivazione > Date then
msg=msgbox("Non trassare portando la data di sistema " & _
"indietro!",vbexclamation,"Stordito!")
else
'CONTROLLO CHE LA DATA ODIERNA RIENTRI NEI TERMINI DELLA DEMO
if Date > Cdate("31/08/2007") then
msg=msgbox ("La licenza del programma è scaduta, " & _
"acquistare la versione completa",vbexclamation,"Licenza Scaduta")
End
end if
end if
end if
rs.close
End Function