Disable database after...

abz_y2k

Registered User.
Local time
Today, 10:47
Joined
Jul 30, 2007
Messages
66
Morning all

Hope someone can help me with this query. Sorry if I put the post on the wrong section.

I have created a database on access 97 (that's local authority for you 13 years behind) at work.

What I want to do is to put a VB code on the database for a particular date (25th Dec 2010) so all the fields from that day forward will become read only.

Your help will be much appreciated.

regards
 
If your users can see the database window, you are S.O.L.

If instead you have a startup/switchboard situation, then in the Form_Open routine (or no later than the Form_Load routine), include code to test the date and muck the form properties.

E.g.

Code:
    If Now() >= #25-Dec-2010# then
        Me.AllowEdits = False
        Me.AllowAdditions = False
        Me.AllowDeletions = False
    End If

Look at other properties of the form that might also be relevant.

WARNING: Mucking the indicated .Allowxxxx properties can cause other form and control events to fire unexpectedly when the form "restructures" itself.
 
Thanks mate, its sorted !
 

Users who are viewing this thread

Back
Top Bottom