gameDatetime comes from database
dateTimeNow of course is current time.
Question:
I want to be able to lock users from making changes, Friday to Sunday.
see once it is locked then all users can see other users data, but no one can change anything, not even individuals who entered the data, this is useful for printing all users data which is what I am trying to accomplish.
When it is not locked, then each user can only add/change their own data, this is perfect as well.
'--------------------------------------------------------------------------
' Returns true if all games for the specified week are locked.
'--------------------------------------------------------------------------
function AllGamesLocked( week)
dim dateTimeNow, rs, gameDatetime
AllGamesLocked = false
dateTimeNow = CurrentDateTime ()
set rs = WeeklySchedule( week)
do while not rs.EOF
gameDatetime = CDate(rs.Fields ("Date").Val ue & " " & rs.Fields("Time ").Value)
if Weekday(gameDat etime) = vbSunday and gameDatetime <= dateTimeNow then
AllGamesLocked = true
exit function
end if
rs.MoveNext
loop
end function
'--------------------------------------------------------------------------
' Returns true if the game is locked, based on the specified start time.
'--------------------------------------------------------------------------
function GameLocked(game Datetime)
GameLocked = false
if gameDatetime < CurrentDateTime () then
GameLocked = true
end if
end function
dateTimeNow of course is current time.
Question:
I want to be able to lock users from making changes, Friday to Sunday.
see once it is locked then all users can see other users data, but no one can change anything, not even individuals who entered the data, this is useful for printing all users data which is what I am trying to accomplish.
When it is not locked, then each user can only add/change their own data, this is perfect as well.
'--------------------------------------------------------------------------
' Returns true if all games for the specified week are locked.
'--------------------------------------------------------------------------
function AllGamesLocked( week)
dim dateTimeNow, rs, gameDatetime
AllGamesLocked = false
dateTimeNow = CurrentDateTime ()
set rs = WeeklySchedule( week)
do while not rs.EOF
gameDatetime = CDate(rs.Fields ("Date").Val ue & " " & rs.Fields("Time ").Value)
if Weekday(gameDat etime) = vbSunday and gameDatetime <= dateTimeNow then
AllGamesLocked = true
exit function
end if
rs.MoveNext
loop
end function
'--------------------------------------------------------------------------
' Returns true if the game is locked, based on the specified start time.
'--------------------------------------------------------------------------
function GameLocked(game Datetime)
GameLocked = false
if gameDatetime < CurrentDateTime () then
GameLocked = true
end if
end function
Comment