Text Box Undo

K

Kiran

I am using the below code for disabling Ctrl+Z(Command for Undo) in the Form.
However what I see is “z†being typed when I try to use it. Is there a
solution for this. I need to use this because when the staff enters something
wrong in the text box and presses Ctrl Z all the data in the Text Box is
lost. I would be glad to know if there is an alternate way of implementing
this.

If Shift = acCtrlMask Then
Select Case KeyCode
Case 90
MsgBox ("You have selected Ctrl Z")
Case Else
End Select
End If
 
K

Kiran

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
 
K

Kiran

Hi,
I agree fully with your point on co-opting standard functions. We are
forced to use Access as a platform for preparation of Reports as the Third
party software was expensive for the firm(Though Access DB can in no way be
compared to the versatility of that Software). This leads to a basic question
of when the Access has to be used and its limitations.

Thanks and Regards
Kiran
 
B

BruceM

Access is a development platform. The developer creates the application,
which can be very versatile indeed. Access has limitations, as does any
product, but when you pose the somewhat rhetorical question about when
Access "has to be used" it seems to suggest you regard it as only a fallback
choice.

People sometimes post here with problems that could be addressed by
off-the-shelf software, and are advised that development costs will surely
exceed the purchase price. The reason third-party software can be an
attractive option for standard situations (e.g. personal or small business
financial management, contact management, and so forth) is that people would
otherwise be confronted with higher costs for custom development.

However, some situations cannot be addressed with standard software
packages, in which case Access can be a powerful and effective tool, but
without question there is a steep learning curve. Access has capabilites of
which I was unaware a year ago or even a month ago. That I did not know
about those capabilities does not reflect badly on Access. That being said,
Access has some problems that have remained unfixed through several versions
of the product, and some new ones that leave me wondering what if anything
they were thinking, so it can present unnecessary challenges, but in general
it has a lot of flexibility and range.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top