Link to home
Start Free TrialLog in
Avatar of APD Toronto
APD TorontoFlag for Canada

asked on

Restricting Reports / Dates

Hello Experts,

I have restricted employees from accessing past sales reports using If Date() > Me.txtDate

However, I was just informed that employees just change their system date to overcome this. Simple yet clever

Is there a way to prevent this?

Can I restrict non-admin users from restricting date changes? - this is why I'm also posting in XP Category.

The BE fil is on a network drive, but i can move it to a PC that can't be physically accessed by employes, and somehow use that system date in my FE?  Perhaps, running a .vbs at 12am to update a .txt file, and use that?
Avatar of Nick67
Nick67
Flag of Canada image

I prefer the trust yet verify model.
It is easy enough to create a table that will record who opened the report and when each time it opens.
Since these records would be created serially, you can let the users know that attempts to circumvent the restriction will be obvious, and traceable.
Another method is to look and see if there are records with a Date greater than today

Dim rs as recordset
set rs = currentdb.openrecordset("select SomeID from SomeTable where RecordDate >= (Date() +1)
if rs.recordcount > 0 then
    Msgbox "Hmm...You seem to have gone back in time to look at a past report.  I am coming with a stick now!"
end if
Avatar of APD Toronto

ASKER

Nick, could you elaborate a bit more?
ASKER CERTIFIED SOLUTION
Avatar of Jeffrey Coachman
Jeffrey Coachman
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Presumably, your records have a date in them.
If you are only allowed to check today's records, there should be no 'tomorrow' records yet
So, ergo, if you check for records with a date of tomorrow or later, the only way they could exist is if you messed with the system clock.

Busted
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial