I have the following code that worked in Access 2003. We are converting to Access 2010 and now it gives a warning message.
Option Compare Database
Option Explicit
Public Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" _
(ByVal hWnd As Long, _
ByVal lpOperation As String, _
ByVal lpFile As String, _
ByVal lpParameters As String, _
ByVal lpDirectory As String, _
ByVal nShowCmd As Long) As Long
Public Const SW_SHOWMAXIMIZED As Long = 3
Public Const SW_SHOWNORMAL As Long = 1
Function linkConvert()
Dim ws_Path As String
Dim ReturnValue, fso
Set fso = CreateObject("Scripting.FileSystemObject")
ws_Path = Application.CurrentProject.Path & "\DB_Convert"
If (fso.FileExists(ws_Path + ".mde")) Then
ws_Path = ws_Path + ".mde"
Else
ws_Path = ws_Path + "_SRC.mdb"
End If
ReturnValue = ShellExecute(hWndAccessApp, "Open", ws_Path, 0&, 0&, SW_SHOWMAXIMIZED)
End Function
The warning states:
"The command line you used to start Microsoft Access contains an option that Microsoft Access doesn't recognize. Ext and restart Microsoft Access using valid command-line options."
If I click the okay button the DB_Convert database opens and everything proceeds as normal. Any ideas on the cause for the warning and how do I fix it




