True. Another option is setting enabled to false and locked to true. This way
they cannot set the focus to it, but can still see it and it is not grayed out
like just the normal enabled setting does.
Here's a chunk of code that I use in the form_open event when I want a control
locked.
Public Const lngColorBG_Locked As Long = 15132390
'---------------------------------------------------------------------------------------
' Neil Squires (406) 444-6980. [EMAIL PROTECTED]
'
' Routine Name : processLockedControl
' Creation Date : 08/15/2005 10:05
' Last Mod. Date : 08/15/2005
' Routine Type : Sub
' In Parameters :
' Out Parameters :
' IN/Out Params : ByRef ctlrControl As Control
' Opt. Params :
' Return Type :
' Purpose : This routine receives a control that is to be made "locked".
The
' backcolor is set to the correct color.
'---------------------------------------------------------------------------------------
Public Sub processLockedControl(ByRef ctlrControl As Control)
ctlrControl.BackColor = lngColorBG_Locked
ctlrControl.Locked = True
ctlrControl.Enabled = False
End Sub
Neil Squires
-----Original Message-----
From: [email protected]
[mailto:[EMAIL PROTECTED] Behalf Of Hoffman, Tobi K
(DYS)
Sent: Thursday, December 08, 2005 11:21 AM
To: [email protected]
Subject: RE: [AccessDevelopers] Locking after entry in a Memo or Text
box
Trouble with setting enabled to false is that it gets grayed out.
Setting Locked to true keeps it looking the same but prevents changes.
Tobi
-----Original Message-----
From: [email protected]
[mailto:[EMAIL PROTECTED] On Behalf Of Squires, Neil
Sent: Thursday, December 08, 2005 1:18 PM
To: [email protected]
Subject: RE: [AccessDevelopers] Locking after entry in a Memo or Text
box
me.txtMyField.enabled = false
Neil Squires
-----Original Message-----
From: [email protected]
[mailto:[EMAIL PROTECTED] Behalf Of Joe
Sent: Thursday, December 08, 2005 11:15 AM
To: [email protected]
Subject: [AccessDevelopers] Locking after entry in a Memo or Text box
Is there any way that you can set up a form to lock the data after a
user enters in data into a memo or text box? This way you can have it
so they can't go back and edit it.
Please zip all files prior to uploading to Files section.
Yahoo! Groups Links
Please zip all files prior to uploading to Files section.
Yahoo! Groups Links
Please zip all files prior to uploading to Files section.
Yahoo! Groups Links
------------------------ Yahoo! Groups Sponsor --------------------~-->
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/u8TY5A/tzNLAA/yQLSAA/q7folB/TM
--------------------------------------------------------------------~->
Please zip all files prior to uploading to Files section.
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/AccessDevelopers/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/