View Full Version : how do you limit user's rights to view their own records from 5 days ago?


gino
04-13-2000, 09:15 AM
i have command buttons to have user to view first, previous, next, and last records. how do i restrict user to view records pass 5 days. is there a way to this?

thanks...

Pat Hartman
04-13-2000, 11:15 AM
If you are talking about not allowing people to view records more than 5 days old, change the query for the form so that it only retrieves records that satisfy that criteria. If you are talking about allowing them to view everything but not allowing them to update records more than 5 days old, you will have to do that with code. In the On Current event of the form, check the date in question and if it is more than 5 days old, change the allowedits property to false.

If me.yourdate > date() - 5 then
me.allowedits = true
else
me.allowedits = false
end if