I have a table called tblConfig. I need to make this function (Public Function ExportBatch()) to make a decision based on whether the tblConfig.UseServer is true or false. If True it should run Export-FORM. if False it should run Export-FORMServer. I'm new and not sure what I'm doing wrong. Please help.
Public Function ExportBatch()
Dim strServer As String
strReport = DLookup("UseServer", "tblConfig")
If strReport.value = T
DoCmd.RunSavedImportExport "Export-FORM"
Dim myPath As String
myPath = "C:\CCBatch\Rename.bat"
Call Shell(myPath, 1)
Else
DoCmd.RunSavedImportExport "Export-FORMServer"
Dim myPath As String
myPath = "C:\Program FIles (x86)\Comcash 8.0\Rename.bat"
Call Shell(myPath, 1)
End If
End Function
Public Function ExportBatch()
Dim strServer As String
strReport = DLookup("UseServer", "tblConfig")
If strReport.value = T
DoCmd.RunSavedImportExport "Export-FORM"
Dim myPath As String
myPath = "C:\CCBatch\Rename.bat"
Call Shell(myPath, 1)
Else
DoCmd.RunSavedImportExport "Export-FORMServer"
Dim myPath As String
myPath = "C:\Program FIles (x86)\Comcash 8.0\Rename.bat"
Call Shell(myPath, 1)
End If
End Function