[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Form pops up when not supposed to....

Posted on 2000-03-23
3
Medium Priority
?
148 Views
Last Modified: 2013-11-28
Hello,

  I have several forms in my project, three of which are named frmAddProduct, frmEditProduct and frmReview.  These are all MDI child forms.  Under the frmReview and frmEditProduct form, there is a text box which has this code for the keydown event:

Private Sub txtReview_KeyDown(KeyCode As Integer, Shift As Integer)
If Shift = 2 And KeyCode = vbKeyA Then
    Me.txtReview.SelStart = 0
    Me.txtReview.SelLength = Len(Me.txtReview)
End If
End Sub

(the name of the text box on the frmEditProduct form is 'txtDescription')

Which basically just selects all the text in the text box when Ctrl-A is pressed.  When I press Ctrl-A, it selects the text in the box, but then frmAddProduct appears for no reason.  I have the same code in the frmAddProduct for the keydown event for a text box called txtDescription, which works without popping up any extra forms.  Whats going on here?
0
Comment
Question by:ingenito
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 2

Expert Comment

by:evertd
ID: 2649650
You can look at the keypreview property of you forms. Maybe the value is true.

If this won't work you can set the visible property of each form to true and manually set the visible property
0
 
LVL 32

Accepted Solution

by:
Erick37 earned 400 total points
ID: 2649701
Do you have a shortcut key assigned to Ctrl-A ?
0
 

Author Comment

by:ingenito
ID: 2649720
Erick37 had it right.  Stupid me :)
0

Featured Post

Enhanced Intelligibility Without Cable Clutter

Challenge: The ESA office in Brussels wanted a reliable audio conference system for video conferences. Their requirement - No participant must be left out from the conference and the audio quality must not be compromised.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Marketers need statistics and metrics like everybody else needs oxygen. In this article we explain how to enable marketing campaign statistics for Microsoft Exchange mail.
Starting your own business is always a daunting process, and for most people it is brand new experience. Avoid the common pitfalls by following these tips to start on the road to success.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Learn how to set-up PayPal payment integration in your Wufoo form. Allow your users to remit payment through PayPal upon completion of your online form. This is helpful for collecting membership payments, customer payments, donations, and more.
Suggested Courses

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question