473,399 Members | 2,146 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,399 software developers and data experts.

Restricting editing on one field based on another field.

I have a database that I need to restrict the ability to edit one
field based on another. The two fields are DOS (date) and Amount
(currency). I only want the users to be able to edit the Amount field
if the DOS is =>now()-5. Does anyone have any suggestions? Thanks,
Lisa

Apr 26 '07 #1
1 3146
co***@musc.edu wrote:
I have a database that I need to restrict the ability to edit one
field based on another. The two fields are DOS (date) and Amount
(currency). I only want the users to be able to edit the Amount field
if the DOS is =>now()-5. Does anyone have any suggestions? Thanks,
Lisa
In your OnCurrent event for the form you could have something like
Me.Amount.Enabled = (Not Me.NewRecord And Me.DOS + 5 >= Date)
and maybe one other in the DOS AfterUpdate event like
Me.Amount.Enabled = (Me.DOS + 5 >= Date)
Apr 26 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: MX1 | last post by:
Here's an interesting one. I have a database that has user level security invoked. The design is normalized and I have one field in particular called Rep ID. Any thoughts on how I can allow all...
4
by: John Baker | last post by:
Hi: Hi: I have a linked query, which includes a specially constructed Key from a data base, in the form: 25-1-1, although the fields may be any number of digits. For purposes of discussion,...
6
by: \Shannan Casteel via AccessMonster.com\ | last post by:
I have a database for warranty claims. There is one form based on one large table. The first object is a combo box asking for dealer number. When that field is updated the dealers name, address,...
5
by: MLH | last post by:
I have a form based on a table that is opened this way... DoCmd.OpenForm "frmAdminSetupInfo", , , , A_EDIT It was my intention that the form allow the user to edit table data - not add...
4
by: Dennis C. Drumm | last post by:
Is there a way with C# to allow one class access to a method or field of another class, without making that method or field visible to all other classes, as would be the case when making the method...
1
by: ___Newbie___ | last post by:
Hello, What is the best way to implement a form based editing? The user would select first from a list control (highlighted selection) ? e.g. through a listbox or datagrid. Then, select from...
0
by: compl | last post by:
I have a database that I need to restrict the ability to edit one field based on another. The two fields are DOS (date) and Amount (currency). I only want the users to be able to edit the Amount...
5
by: sara | last post by:
Hi - I have 2 new questions in a new database I'm trying to develop. The first has 6 fields on a table and allows the user to enter them on a form. The form is bound to the table. All 6...
8
by: sneddo | last post by:
Ok I am trying to do the above, I have got a script that will restrict the length but it requires the user to enter the field and hit a key, before it will work. This would normaly be find, but...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.