Form pops up when not supposed to....
Posted on 2000-03-23
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)
(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?