7 Day Lock?

A

A Moloney

Hi. I have a calender (Calendar1),command button
(Command53) and text box (DateField) on a form. the idea
is that a user selects a date on the calendar and clicks
the go button, this then displays the selected date in
the text box and opens the relevant record (this all
works perfectly so far). Is there any way that i would be
able to put a read only limit somewhere in this function
so that if todays date is within 7 days of the selected
date then it prompts for a password with cancel or read-
only option?
Any help / alternative suggestion appreciated.
 
P

Perry

Me.RecordsetType = IIf(DateDiff("d", Calender1, Date) < 7, 2, 0)

The above line changes the form's recordsettype from snapshot (readonly) to
dynaset
if the difference between the calender value and system date is less than 7
days.
Adjust the above line to meet yr criteria.

Krgrds,
Perry
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

REPOST 7 day read-only 0
Lock record 0
Lock records 0
read-only 1
I didn't think of this 4
Synchronization problems while moving folders to new email 1
7 day lock 0
ActiveX Controls 0

Top