C
Cyberwolf via AccessMonster.com
I have the following code that opens as many as 5 different forms based on
the selected items in the list box. It does not stop code execution on each
form open, it just opens all of the forms at the same time.
Private Sub cmdOpen_Click()
Dim varItem As Variant
On Error GoTo cmdOpen_Click_Error
Me.Visible = False
For Each varItem In Me.lstSegTables.ItemsSelected
DoCmd.OpenForm (Me.lstSegTables.ItemData(varItem)), acFormDS, , ,
acFormAdd, acDialog
Next varItem
Me.Visible = True
On Error GoTo 0
Exit Sub
cmdOpen_Click_Error:
MsgBox "Error " & Err.Number & " (" & Err.Description & ") in procedure
cmdOpen_Click of VBA Document Form_Form1"
End Sub
Also, the forms do not open properly. In this I meam the do not open like
other forms I have set to open with acDialog. They open very small. All
you can see is the "X" used to close and part of the 1st field in the form.
Any help would be appreciated.
TIA,
the selected items in the list box. It does not stop code execution on each
form open, it just opens all of the forms at the same time.
Private Sub cmdOpen_Click()
Dim varItem As Variant
On Error GoTo cmdOpen_Click_Error
Me.Visible = False
For Each varItem In Me.lstSegTables.ItemsSelected
DoCmd.OpenForm (Me.lstSegTables.ItemData(varItem)), acFormDS, , ,
acFormAdd, acDialog
Next varItem
Me.Visible = True
On Error GoTo 0
Exit Sub
cmdOpen_Click_Error:
MsgBox "Error " & Err.Number & " (" & Err.Description & ") in procedure
cmdOpen_Click of VBA Document Form_Form1"
End Sub
Also, the forms do not open properly. In this I meam the do not open like
other forms I have set to open with acDialog. They open very small. All
you can see is the "X" used to close and part of the 1st field in the form.
Any help would be appreciated.
TIA,