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

Trap click

Hi all!

I keep the subform locked until certain fields in the main for is filled
in. Is it possible to trap if the user clicks a field in a subform that is
locked.

Sigurd
Nov 12 '05 #1
3 1726
If the field was called MyField . . .

If Me.MyField.Locked = True Then
MsgBox "This field is locked."
End If

Nigel
I keep the subform locked until certain fields in the main for is filled
in. Is it possible to trap if the user clicks a field in a subform that is
locked.

Sigurd

Nov 12 '05 #2
sorry - forgot to include . . .

Add this code to the GotFocus event

Private Sub MyField_GotFocus()
If Me.MyField.Locked = True Then
MsgBox "This field is locked."
End If
End Sub
Nov 12 '05 #3

"Nigel Lawrance" <na*@exeter37.freeserve.co.uk> wrote in message
news:bj**********@newsg4.svr.pol.co.uk...
It seems like the locked control or subform don't react to anything, it is truly locked. Have tryed both got_focus and mouse_down event with same
result. Are you sure this is working?


Yes it works fine on my form.

When you say the subform is locked - what do you mean exactly?
Also, are the fields set to Enabled False?

I suggested GotFocus so that if you tabbed OR clicked into the field it
would tell you if it was locked.
You could use the OnClick event if you wanted to trap when someone clicked
into the field.

Can you click into the field at all?

Nigel

It seems like i have used enabled=false in addition to locked=true. When I
change this it works like you say. Thanks again

Sigurd
Nov 12 '05 #4

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

Similar topics

2
by: Sławomir Speth | last post by:
hi all How trap mouse click outside my control - like close popup menu
1
by: Michael | last post by:
How to trap click event of LinkButton inside a Repeater? I'm using C#. Thanks.
11
by: pemo | last post by:
Ambiguous? I have a student who's asked me to explain the following std text (esp. the footnote). 6.2.6.1.5 Certain object representations need not represent a value of the object type. If...
10
by: pemo | last post by:
As far as I understand it, a trap representation means something like - an uninitialised automatic variable might /implicitly/ hold a bit-pattern that, if read, *might* cause a 'trap' (I'm not...
2
by: fuehrer | last post by:
Hi guys, Is there any way i can trap the click event of the close, refresh, back,home and the forward button? Also i need this to work for both firefox and IE. I'm new to JS so please make it as...
10
by: john | last post by:
In a form I'm trying to make a search field to be able to quickly find a record on ID-number. User enters a number and presses enter to move to that record. How do I trap for the enter-keystroke...
8
by: =?Utf-8?B?RyBIdXN0aXM=?= | last post by:
This is the 2nd time posting so sorry for duplications. I am using VB.NT 2005 & a standard Combobox. I've been wracking my brain over this problem for a over a month & cannot seem to find a way to...
6
by: John | last post by:
In a form how I can I trap for the action that a user opens the built in 'find dialog'? I would like to trap for it and before the dialog shows up, I would like to execute some code, and after that...
3
by: mtczx232 | last post by:
I have TabControls that Hold Forms on his TabPges (this make me easy to give ability to Designing each form in his IDE window). When form x is in middle of Edit Data Mode, I going to prevent:...
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
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...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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.