Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
sub SetLastUpdateMonth
dim strSQL as string
dim strThisMonth as string
strThisMonth = format$(date(),"mm")
strSQL = "INSERT INTO tblControl (LastUpdateMonth) "
strSQL = strSQL & "VALUES ('" & strThisMonth & "')"
DoCmd.SetWarnings (False)
DoCmd.RunSQL (strSQL)
DoCmd.SetWarnings (True)
End Sub
Public Function CheckMonth()
dim strThisMonth as string
dim strStoredMonth as string
strThisMonth = format$(date(),"mm")
strStoredMonth = DLookup"[LastUpdateMonth]", "tblControl")
if strStoredMonth <> strThisMonth then
Docmd.RunQuery qryYourUpdateQuery
SetLastUpdateMonth
end if
end function
if strStoredMonth <> strThisMonth then
Docmd.RunQuery qryAddOneMonth
SetLastUpdateMonth
end if