473,513 Members | 2,469 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3160
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
2320
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 the reps to have read-only access to the DB BUT somehow restrict each REP to only see data or records that have his or her REP ID associated with...
4
1717
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, call this field KEY I need to select a field from another record and substitute the value of that field for the first n digits of the KEY above....
6
2174
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, and phone number appears in some text boxes. When the dealer selects their dealer number I would like a password field or dialog box to appear. ...
5
1640
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 records. The table contains a single record only. I don't want more records be added to the table. When frmAdminSetupInfo opens, all one has to do to go...
4
4615
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 or field public? Thanks, Dennis
1
1588
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 buttons: , , . When editButton is clicked, a form will be displayed for editing. How would I populate the form edit window? By setting each field....
0
352
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 field if the DOS is =>now()-5. Does anyone have any suggestions? Thanks, Lisa
5
2300
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 fields are default value = 0 on the table and on the form. Fields are filled in at different times and maybe by different people, so I wanted them all...
8
8694
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 the title field gets its information from a previouse page so its value can easily be over 40 chars. (I can not restrict the length on the previouse...
0
7269
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
1
7123
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
5701
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5100
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3248
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3237
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1611
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
811
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
470
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.