Re: Text Box Undo
- From: Kiran <Kiran@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 4 May 2009 23:37:02 -0700
Hi,
Thanks for the help. The problem I face is when the user clicks Ctrl+Z
all the text typed in the Text box disappears. This is not intended as the
comments typed in are sometimes lengthy. If the user types comumunication
instead of communication and then presses Ctrl+Z the whole text he typed
before the word is also lost which is horrifying for the user.
I am also trying to save the record once the user presses spacebar through
which the user can get the desired result if he presses Ctrl+Z. I tried the
below code in which I have a problem. When I press the spacebar the cursor
moves to the beginning of the Text which is not intended.Your assistance is
greatly appreciated
If KeyCode = vbKeySpace Then
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveForm, , acMenuVer70
End If
Thanks
Kiran
"Linq Adams via AccessMonster.com" wrote:
Sorry, hit "Submit" too soon!.
Having said that, one line
Keycode = 0
will correct your code:
Private Sub TextBoxName_KeyDown(KeyCode As Integer, Shift As Integer)
If Shift = acCtrlMask Then
Select Case KeyCode
Case 90
KeyCode = 0
MsgBox ("You have selected Ctrl Z")
Case Else
End Select
End If
End Sub
Linq Adams wrote:
I'm somewhat confused! Presumablt if the user enters incorrect data and
presses Control + Z it's because they want the data to disappear! What am I
missing here?
You should also note that one of the main points in having Windows compliant
apps is so that the same commands do the same things in all of them. Taking a
standard command away from experienced users is very user-unfriendly and apt
to aggravate them.
--
There's ALWAYS more than one way to skin a cat!
Answers/posts based on Access 2000/2003
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/200905/1
- Follow-Ups:
- Re: Text Box Undo
- From: Linq Adams via AccessMonster.com
- Re: Text Box Undo
- References:
- Text Box Undo
- From: Kiran
- Re: Text Box Undo
- From: Linq Adams via AccessMonster.com
- Re: Text Box Undo
- From: Linq Adams via AccessMonster.com
- Text Box Undo
- Prev by Date: Re: Dlookup with multiple criteria error
- Next by Date: Re: Using strings in VB
- Previous by thread: Re: Text Box Undo
- Next by thread: Re: Text Box Undo
- Index(es):
Relevant Pages
|