BUG: DBCombo Control Does Not Allow Selection on Modal FormLast reviewed: October 16, 1996Article ID: Q150210 |
The information in this article applies to:
SUMMARYIf a DBCombo control is placed on a form that is shown modally, then the user is unable to click a selection of the drop-down list. This behavior only occurs in an EXE file, it does not occur in the Design Environment of Visual Basic.
STATUSMicrosoft has confirmed this to be an issue in the Microsoft products listed at the beginning of this article. Microsoft is researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
WORKAROUNDTo work around this problem, the function below can be used to simulate showing a form modally. The workaround allows the DBCombo control to be used. Instead of showing a form modally, show the form using a method such as the one documented below. For example, to simulate invoking Form1 modally, call the method as shown below:
ShowModalForm Form1The subroutine ShowModalForm is shown below, and can be placed in a Form or standard code module:
Public Sub ShowModalForm(frmTarget As Form) Dim ofrm As Object 'Disable all the forms For Each ofrm In Forms ofrm.Enabled = False Next ofrm 'Now show the target form non-modal frmTarget.Show 'If the frmTarget was disabled by the loop above 'make sure it is now enabled frmTarget.Enabled = True 'Sit in a loop until the target form is dismissed Do While frmTarget.Visible = True DoEvents Loop 'We have left the loop, so the dialog has been dismissed 'Now Enable the forms, and exit the procedure For Each ofrm In Forms ofrm.Enabled = True Next ofrm End Sub Steps To Reproduce the Problem
ShowModalForm Form2 |
KBCategory: kbprg kbbuglist
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |