R
rml
I have the following code on a form. The form is modal and popup. This
allows me to maximize the form on load. My problem is that when I click that
button, it is behind the main form. How can I make it be in front without
losing the modal and popup?
Thanks.
Private Sub Command265_Click()
On Error GoTo Err_Command3_Click
'Old Code
'========================
'Dim stDocName As String
'stDocName = "Codes"
'DoCmd.OpenQuery stDocName, acNormal, acEdit
Dim strSQL As String
'Construct our SQL Statement
strSQL = "SELECT code, [Codes].Make, [Codes].Description" & _
" FROM [Codes]" & _
" WHERE code IN (" & fcnFormatList([Forms]![parts]![Model]) &
");"
'Execute the SQL through the Current Project connection
CurrentProject.Connection.Execute "CREATE VIEW tempView AS " & strSQL
'Open the Query
DoCmd.OpenQuery "tempView", acViewNormal, acReadOnly
'Drop the Query
CurrentProject.Connection.Execute "DROP VIEW tempView"
Exit_Command3_Click:
Exit Sub
Err_Command3_Click:
MsgBox Err.Description
Resume Exit_Command3_Click
End Sub
allows me to maximize the form on load. My problem is that when I click that
button, it is behind the main form. How can I make it be in front without
losing the modal and popup?
Thanks.
Private Sub Command265_Click()
On Error GoTo Err_Command3_Click
'Old Code
'========================
'Dim stDocName As String
'stDocName = "Codes"
'DoCmd.OpenQuery stDocName, acNormal, acEdit
Dim strSQL As String
'Construct our SQL Statement
strSQL = "SELECT code, [Codes].Make, [Codes].Description" & _
" FROM [Codes]" & _
" WHERE code IN (" & fcnFormatList([Forms]![parts]![Model]) &
");"
'Execute the SQL through the Current Project connection
CurrentProject.Connection.Execute "CREATE VIEW tempView AS " & strSQL
'Open the Query
DoCmd.OpenQuery "tempView", acViewNormal, acReadOnly
'Drop the Query
CurrentProject.Connection.Execute "DROP VIEW tempView"
Exit_Command3_Click:
Exit Sub
Err_Command3_Click:
MsgBox Err.Description
Resume Exit_Command3_Click
End Sub