G
Guest
I need some desperate help.
BACKGROUND
I have some users that can't grasp the concept they need to download (from a
mainframe) a report before the go clicking buttons in an Access database.
This results in old data getting processed back into the report. An
exception query shows the discrepancies but I have to personally go in and
delete the older records whenever they do this. I have rigged Monarch
(DataWatch's software to process mainframe report into table format) via a
calculated field and a filter to export only those fields with the current
date (so, wrong date, report exports a blank row).
Request
I know how to do the MsgBox in Access that will tell them "YOU IDIOT!!
Download the report FIRST." What I need is Access to look at the report it
imports (Monarch's resulting table) and if it's blank, row count=0, file size
=1kb, whatever, that it will then pop up a message box. If report OK, then
it will proceed as usual.
Warnings
I'm an Access idiot, please don't give me anything too complicated...
CODE
Private Sub cmdImportFiles_Click()
Dim stAppName As String
'Launch Monarch and process today's report
stAppName = "H:\IMPORT\IMPSAS\APEX\Macros\PCSOL.bat"
Call ShellWait(stAppName, 1)
DoCmd.Hourglass True
DoCmd.SetWarnings False
'Import today's report into Access
DoCmd.TransferDatabase acImport, "dBase 5.0",
"H:\IMPORT\IMPSAS\APEX\MFiles\", acTable, "STARFAX.DBF", "starfax"
<INSERT FILE CHECK HERE>
BACKGROUND
I have some users that can't grasp the concept they need to download (from a
mainframe) a report before the go clicking buttons in an Access database.
This results in old data getting processed back into the report. An
exception query shows the discrepancies but I have to personally go in and
delete the older records whenever they do this. I have rigged Monarch
(DataWatch's software to process mainframe report into table format) via a
calculated field and a filter to export only those fields with the current
date (so, wrong date, report exports a blank row).
Request
I know how to do the MsgBox in Access that will tell them "YOU IDIOT!!
Download the report FIRST." What I need is Access to look at the report it
imports (Monarch's resulting table) and if it's blank, row count=0, file size
=1kb, whatever, that it will then pop up a message box. If report OK, then
it will proceed as usual.
Warnings
I'm an Access idiot, please don't give me anything too complicated...
CODE
Private Sub cmdImportFiles_Click()
Dim stAppName As String
'Launch Monarch and process today's report
stAppName = "H:\IMPORT\IMPSAS\APEX\Macros\PCSOL.bat"
Call ShellWait(stAppName, 1)
DoCmd.Hourglass True
DoCmd.SetWarnings False
'Import today's report into Access
DoCmd.TransferDatabase acImport, "dBase 5.0",
"H:\IMPORT\IMPSAS\APEX\MFiles\", acTable, "STARFAX.DBF", "starfax"
<INSERT FILE CHECK HERE>