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

MS Access - Make double click mandatory to enter data into field

Hello All

I am using Microsoft Access 2003. I have an input form (Single Form) into which the clerk records appliance details. Some appliance details will never change, for instance the 'Make and Model'. Some details will need to be updated later on, for instance the location of the appliance. When updates are required, the user opens the update form (Single Form). The user is able to cycle through all records of appliances using this form. Fields which never need to be updated are presented to the data entry clerk but have been locked to prevent accidental changes. I have set the TAB STOP property on the unlocked, updatable fields to NO. This is my first attempt at preventing accidental changes. I would like to make DOUBLE CLICK a prerequisite before ‘data entry’ or ‘change’ can take place within the updatable fields. Would someone please help me out with an example of the code I need to use to achieve this. I expect it will be something to do with the double click event of the field property?

Thank you in anticipation of your assistance.
Nov 2 '09 #1
5 3630
ajalwaysus
266 Expert 100+
As my first stab at what you want, I would envision a form with all your fields you mentioned, and the fields you don't want to be updated ever be Disabled (Enabled = False) then I would set those fields that can be edited to Locked (Locked = True). Then what you could do is put a double click event on each of those locked fields to set Locked = False only when they are double clicked. Then you could set Locked = True when they tab out, maybe Lost Focus.

That is my quick 2 cents.

Let us know if this works for you, or if you were wanting to go a different way.

-AJ
Nov 2 '09 #2
ChipR
1,287 Expert 1GB
You can certainly use the double click event and just write:
Expand|Select|Wrap|Line Numbers
  1. controlName.Locked = False
From a user's view, though, it would be good to have a note stating that on the form, or a button that unlocks all the appropriate controls on the form. I needed something like this, so I use a button labeled Edit, then once clicked it changes to Done, and locks all the controls when it's clicked again.
Nov 2 '09 #3
Hello Ajalwaysus and ChipR
Thank you both for your very helpful replies. I drew assistance from a combination of each of your suggestions in order to resolve my problem. I am not sure how to remove the question now that you have very kindly provided me with a solution. Many Many thanks
Nov 2 '09 #4
NeoPa
32,556 Expert Mod 16PB
@David Wright
That's alright David. You can't, and we don't want it removed.
Nov 3 '09 #5
NeoPa
32,556 Expert Mod 16PB
My two-cents worth :
I would endorse Chip's last point about making the edit state obvious to the user. I use a routine which sets the background colour of the (various sections of the) form.
Expand|Select|Wrap|Line Numbers
  1. Private Sub SetBackground(blnEdit As Boolean)
  2.     Dim lngColour As Long
  3.  
  4.     With Me
  5.         lngColour = IIf(blnEdit, conEditYes, conEditNo)
  6.         .FormHeader.BackColor = lngColour
  7.         .Detail.BackColor = lngColour
  8.         .FormFooter.BackColor = lngColour
  9.     End With
  10. End Sub
conEditNo & conEditYes are simply my choice of the colours to use. You can choose any two available really, for as clear, or as subtle, a variation as you like.
Nov 3 '09 #6

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

Similar topics

3
by: N. Graves | last post by:
Hello, I'm having trouble with a feature that I would like to add to my database. I would like to have the ability to double click a record on a Sub form and that action would open that...
0
by: Jack | last post by:
Windows 2K Pro Access/Excel 2003 Hi there, I have a large number of password protected Excel Workbooks. The files are protected by code that runs when the workbook opens. The code asks the...
2
by: Uninvisible | last post by:
I have put together a db for a law firm to keep track of counterfeit activities. There are four parent tables: tblContact tblTransaction tblAction tblFile I have created a form,...
0
by: Tony Fields | last post by:
Please Help!!! I need to capture the following for the current cell of a datagrid on a webpage when I double-click a cell: 1. Field name (ie. "State", which should be the same as the label,...
1
by: rmgalante | last post by:
I have written an ASP.Net application that uses the standard client-side and server-side validation for various fields on the form. Some of the customers that use the form report symptoms that...
2
by: Jack | last post by:
I have a active server page where records are displayed from a query. The display right now is read only. However, with text box this display can also be edited. The first column shows category...
9
by: Armando | last post by:
I have an app (A2000) where I am letting the user move an object on the screen. I use the OnClick for a command button event to modify the object's Top (or Left) properties, but you can only click...
6
by: Jim Devenish | last post by:
I have an unbound form that displays all the days of the year as a calendar. It has 12 rows of text boxes with either 29,30 or 31 in each row. Text box names are of the form: display_01_01,...
9
by: kzzz | last post by:
Hello, I have a microsoft access file with fields that have "long binary data". I would like keep the same file, but change the "long binary data" into regular text. There are a large number of...
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
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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:
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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.