473,396 Members | 2,087 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Lock Records Where Date Field Entered but Allow Password Override

How can I lock records (disable edits) on a form once completed (based on a date field) but enable them with a password.
Dec 18 '12 #1
2 1775
NeoPa
32,556 Expert Mod 16PB
Firstly, may I say you should check out the Sticky threads at the head of the forum before posting any more questions. I will tidy this up for you this time, but even then it is short of much important information.

What you need to do is place some code in the Form_Current() event procedure of your form that checks the date control for the criteria (that you haven't specified in your question). You must set the form's .AllowEdits property regardless of your check, but the check determines which way to set it. This is because an earlier record may have left it in a state that you cannot predict.

As it's a boolean property, you can simply set it to the result of your check. EG. :
Expand|Select|Wrap|Line Numbers
  1. Me.AllowEdits = IsNull(Me.DateControl)
To help with a solution regarding allowing some people to override this I will need more clear information about what you have in mind. Generally, such things would be better handled at a central level rather than on each form that requires it (otherwise the interface is painful). Using the Network ID is often a good way of minimizing the operator overhead.
Dec 18 '12 #2
Rabbit
12,516 Expert Mod 8TB
If you do end up storing passwords, make sure it's a hash and not plain text.

Also be aware there's nothing preventing the users from bypassing the forms entirely and changing the base data. Not much you can do about that.
Dec 18 '12 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: David | last post by:
Hi, I have a field in a table called 'ShipDate'. This particular field has allow null set to no. So by default this sets all the records to show 00/00/0000 in the field for each record that has...
4
by: peashoe | last post by:
I have an asp page that uses a calendar.js (pop-up) file to add an exact date format in the text field (txtDDate). My problem is I need some javascript that sets an alert that does not allow them...
2
by: Shaiguy | last post by:
I have a table containing the following fields: ProjectUpdateID (PrimaryKey) ProjectID UpdateDate I would like to create a Query in Ms Access 2000 which will return me the most recent 2...
5
by: Bayla Frankl | last post by:
Hi all, I am a little stumped. I have a query I am trying to run to retrieve the last Progress Note record from the database for the current patient so that the therapists can see the last note...
4
by: Mark Lees | last post by:
Difficult problem for me. Easy question for you alls. I have a date field I want to create a second date field that is a 6 months into the future from . My best quess it to use this...
1
by: paulquinlan100 | last post by:
Hi I have a date field which when i enter the date in some places, works fine, however, when trying to enter dates on certain rows i get the message: "The value you entered isn't valid for...
4
by: computerider | last post by:
The following code works great if there is a date for interview, but get an error 94, invalid use of null if date field on form is not entered (it is not required and should be null form time to...
2
by: jacc14 | last post by:
Hi Hope there is someone out there that can help. I am sure this is an easy one although not easy to explain. I have a form which produces a report using a query. On the form I have a start and...
22
by: tonialbrown | last post by:
I have an Sql update statement that I am using that updates the data from a record chosen by the user from a list box lstDelFrom. This is working for all the text fields & updates fine. Once I add...
8
beacon
by: beacon | last post by:
Hi everybody, I'm having a terrible time trying to accomplish what I thought would be extremely easy. I have three date fields on a form (DischargeDate, ReceivedDate, and AuditedDate) and I'm...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.