473,385 Members | 1,814 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,385 software developers and data experts.

Enable/Disable form row edit.

6
How make some rows of a Form fully locked for edit based on criteria?

Let's take two fields Date (criteria), Qty (editable).
I will list all rows where Date is between DateFROM and DateTO.
Now I want to be able to edit only fields where Date>DateTO-5.

Is there property to lock selected rows of displayed data in the Form DataSheet View. I guest I could do it with VBA in Single View but that's not the case.
Nov 10 '09 #1
1 11421
Megalog
378 Expert 256MB
Since you can only edit the current record, then it doesnt matter if you're in a form, continuous form, or datasheet; the same code applies.

I would do something like the following: (substitute the <date criteria> section for whatever real criteria you need)

Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Current()
  2.     If <date criteria> = True or Me.NewRecord Then
  3.         Me.AllowEdits = True
  4.     Else
  5.         Me.AllowEdits = False
  6.     End If
  7. End Sub
There's cleaner ways to execute this, but this gets the idea across.
Nov 10 '09 #2

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

Similar topics

2
by: HolaGoogle | last post by:
Hi all, Can you please tell me what's wrong with my code??? i do have this database in wich i have to field.One is a "yes/no" field and another one is "number" field. To display the yes/no field...
3
by: Bob Bedford | last post by:
I've this code: function checkdate(FormSubmit){ alert(document.getElementById('Mois').value); if(eval(document.getElementById('Mois'))>0 && eval(document.getElementById('Annee'))>0){...
3
by: joe t. | last post by:
Here's what to look at: http://sawyer.thookerov.net/request/itrequest.php (script file: http://sawyer.thookerov.net/request/request.js The form works fine in Firefox. Clicking on certain...
2
by: Dntc | last post by:
Hi All Is there anyway to enable/disable the toolbar buttons on the fly as like in MFC which helps centralizing this process?Let's i have a toolbar button ToolbarButtonSave which can be...
5
by: misiek | last post by:
Hi all. I would like to know if it is possible to dynamically enable/disable row editing in GridView control in ASP.NET 2.0. I am asking because this feature should be enabled/disable depending...
1
by: scanreg | last post by:
My form needs to (1) direct to specified URLs based on a combination of form selections and (2) enable/disable form features based on selections within the form FORM Radio 1 - A - B - C ...
2
by: Naushad | last post by:
Hi all, I am using the countinous form. I want to Enable/Disable the some fields for perticular records as per the following condition when open the form. I have written this code in "On Current...
1
by: rash007 | last post by:
I am building up a table in php built from an array in a database. I can assign each row its own id's etc. But I need to enable or disable checkbox buttons and a text area depending on the checkbox...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...

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.