All of a sudden this morning I am having a problem with the Hyena Reporting. I constantly use this feature and I have had no problems, but suddenly I do. The scenario below I do several times a week, but today it is not working
I am trying to run a report from Hyena and I am trying to create a New table for the information. Microsoft Access Opens, then I get the error:
Run-time error '2103'
The report name 'CurrentUsers' you entered in either the property sheet or macro is misspelled or refers to a report that doesn't exist.
The macro/module halts and the new table is not created. If the table exists, the report runs fine. Nothing was changed in the database but I do not know what is causing this.
Any advice?
Thank you
Melissa
P.S.
My modReports Module looks like this:
Option Compare Database
Option Explicit
Function RunReport()
Dim Cmd, File, Report, Spec As String
Dim Position, Position2 As Integer
' Check value returned by Command function.
Cmd = Command
If Len(Cmd) = 0 Then
MsgBox ("No command line specified; unable to run report")
Exit Function
End If
' find the name of the import file...
Position = InStr(Cmd, "/IMPORT=")
' add 8 to position for length of "/IMPORT="
Position = Position + 8
Position2 = InStr(Position, Cmd, ";")
File = Mid(Cmd, Position, Position2 - Position)
' now find the name of the report to run...
Position = InStr(Cmd, "/REPORT=")
' add 8 to position for length of "/REPORT="
Position = Position + 8
Position2 = InStr(Position, Cmd, ";")
Report = Mid(Cmd, Position, Position2 - Position)
' now find the name of the specification to run...
Position = InStr(Cmd, "/SPEC=")
' add 6 to position for length of "/SPEC="
Position = Position + 6
Position2 = InStr(Position, Cmd, ";")
Spec = Mid(Cmd, Position, Position2 - Position)
If Spec = "" Then
Spec = Report
End If
' now find the option to delete/append the existing file...
Position = InStr(Cmd, "/NOAPPEND;")
If Position > 0 Then
DoCmd.SetWarnings False
If Spec = "SERVICES" Then
DoCmd.OpenQuery "DeleteAllServices", acViewNormal, acEdit
End If
If Spec = "ACCESS" Then
DoCmd.OpenQuery "DeleteAllAccess", acViewNormal, acEdit
End If
If Spec = "COMPUTERS" Then
DoCmd.OpenQuery "DeleteAllComputers", acViewNormal, acEdit
End If
If Spec = "CONNECTIONS" Then
DoCmd.OpenQuery "DeleteAllConnections", acViewNormal, acEdit
End If
If Spec = "DRIVESPACE" Then
DoCmd.OpenQuery "DeleteAllDriveSpace", acViewNormal, acEdit
End If
If Spec = "EVENTS" Then
DoCmd.OpenQuery "DeleteAllEvents", acViewNormal, acEdit
End If
If Spec = "FILES" Then
DoCmd.OpenQuery "DeleteAllFiles", acViewNormal, acEdit
End If
If Spec = "GROUPMEMBERS" Then
DoCmd.OpenQuery "DeleteAllGroupMembers", acViewNormal, acEdit
End If
If Spec = "GROUPS" Then
DoCmd.OpenQuery "DeleteAllGroups", acViewNormal, acEdit
End If
If Spec = "OPENFILES" Then
DoCmd.OpenQuery "DeleteAllOpenFiles", acViewNormal, acEdit
End If
If Spec = "OBJECTMGR" Then
DoCmd.OpenQuery "DeleteAllObjectMgr", acViewNormal, acEdit
End If
If Spec = "PRINTERS" Then
DoCmd.OpenQuery "DeleteAllPrinters", acViewNormal, acEdit
End If
If Spec = "PRINTJOBS" Then
DoCmd.OpenQuery "DeleteAllPrintJobs", acViewNormal, acEdit
End If
If Spec = "PROCESSES" Then
DoCmd.OpenQuery "DeleteAllProcesses", acViewNormal, acEdit
End If
If Spec = "SCHEDJOBS" Then
DoCmd.OpenQuery "DeleteAllSchedJobs", acViewNormal, acEdit
End If
If Spec = "SESSIONS" Then
DoCmd.OpenQuery "DeleteAllSessions", acViewNormal, acEdit
End If
If Spec = "SHARES" Then
DoCmd.OpenQuery "DeleteAllShares", acViewNormal, acEdit
End If
If Spec = "USERDETAILS" Then
DoCmd.OpenQuery "DeleteAllUserDetails", acViewNormal, acEdit
End If
If Spec = "USERS" Then
DoCmd.OpenQuery "DeleteAllUsers", acViewNormal, acEdit
End If
If Spec = "ADOBJECTLIST" Then
DoCmd.OpenQuery "DeleteAllADObjectList", acViewNormal, acEdit
End If
End If
DoCmd.TransferText acImportDelim, Spec, Spec, File, True
Cmd = "CMD.EXE /x /c DEL " + File
Shell (Cmd)
If (Len(Report) > 0) Then
DoCmd.OpenReport Report, acViewPreview
Else
Quit
End If
End Function
Function RunAdReport()
Dim Cmd, File, Report, Spec As String
Dim Position, Position2 As Integer
' Check value returned by Command function.
Cmd = Command
If Len(Cmd) = 0 Then
MsgBox ("No command line specified; unable to run report")
Exit Function
End If
' find the name of the import file...
Position = InStr(Cmd, "/IMPORT=")
' add 8 to position for length of "/IMPORT="
Position = Position + 8
Position2 = InStr(Position, Cmd, ";")
File = Mid(Cmd, Position, Position2 - Position)
' now find the name of the report to run...
Position = InStr(Cmd, "/TABLE=")
' add 8 to position for length of "/TABLE="
Position = Position + 7
Position2 = InStr(Position, Cmd, ";")
Report = Mid(Cmd, Position, Position2 - Position)
' now find the option to delete/append the existing file...
Position = InStr(Cmd, "/NOAPPEND;")
If Position > 0 Then
On Error Resume Next
DoCmd.DeleteObject acTable, Report
End If
DoCmd.TransferText acImportDelim, , Report, File, True
Cmd = "CMD.EXE /x /c DEL " + File
Shell (Cmd)
If (Len(Report) > 0) Then
DoCmd.OpenTable Report
Else
Quit
End If
End Function
I am trying to run a report from Hyena and I am trying to create a New table for the information. Microsoft Access Opens, then I get the error:
Run-time error '2103'
The report name 'CurrentUsers' you entered in either the property sheet or macro is misspelled or refers to a report that doesn't exist.
The macro/module halts and the new table is not created. If the table exists, the report runs fine. Nothing was changed in the database but I do not know what is causing this.
Any advice?
Thank you
Melissa
P.S.
My modReports Module looks like this:
Option Compare Database
Option Explicit
Function RunReport()
Dim Cmd, File, Report, Spec As String
Dim Position, Position2 As Integer
' Check value returned by Command function.
Cmd = Command
If Len(Cmd) = 0 Then
MsgBox ("No command line specified; unable to run report")
Exit Function
End If
' find the name of the import file...
Position = InStr(Cmd, "/IMPORT=")
' add 8 to position for length of "/IMPORT="
Position = Position + 8
Position2 = InStr(Position, Cmd, ";")
File = Mid(Cmd, Position, Position2 - Position)
' now find the name of the report to run...
Position = InStr(Cmd, "/REPORT=")
' add 8 to position for length of "/REPORT="
Position = Position + 8
Position2 = InStr(Position, Cmd, ";")
Report = Mid(Cmd, Position, Position2 - Position)
' now find the name of the specification to run...
Position = InStr(Cmd, "/SPEC=")
' add 6 to position for length of "/SPEC="
Position = Position + 6
Position2 = InStr(Position, Cmd, ";")
Spec = Mid(Cmd, Position, Position2 - Position)
If Spec = "" Then
Spec = Report
End If
' now find the option to delete/append the existing file...
Position = InStr(Cmd, "/NOAPPEND;")
If Position > 0 Then
DoCmd.SetWarnings False
If Spec = "SERVICES" Then
DoCmd.OpenQuery "DeleteAllServices", acViewNormal, acEdit
End If
If Spec = "ACCESS" Then
DoCmd.OpenQuery "DeleteAllAccess", acViewNormal, acEdit
End If
If Spec = "COMPUTERS" Then
DoCmd.OpenQuery "DeleteAllComputers", acViewNormal, acEdit
End If
If Spec = "CONNECTIONS" Then
DoCmd.OpenQuery "DeleteAllConnections", acViewNormal, acEdit
End If
If Spec = "DRIVESPACE" Then
DoCmd.OpenQuery "DeleteAllDriveSpace", acViewNormal, acEdit
End If
If Spec = "EVENTS" Then
DoCmd.OpenQuery "DeleteAllEvents", acViewNormal, acEdit
End If
If Spec = "FILES" Then
DoCmd.OpenQuery "DeleteAllFiles", acViewNormal, acEdit
End If
If Spec = "GROUPMEMBERS" Then
DoCmd.OpenQuery "DeleteAllGroupMembers", acViewNormal, acEdit
End If
If Spec = "GROUPS" Then
DoCmd.OpenQuery "DeleteAllGroups", acViewNormal, acEdit
End If
If Spec = "OPENFILES" Then
DoCmd.OpenQuery "DeleteAllOpenFiles", acViewNormal, acEdit
End If
If Spec = "OBJECTMGR" Then
DoCmd.OpenQuery "DeleteAllObjectMgr", acViewNormal, acEdit
End If
If Spec = "PRINTERS" Then
DoCmd.OpenQuery "DeleteAllPrinters", acViewNormal, acEdit
End If
If Spec = "PRINTJOBS" Then
DoCmd.OpenQuery "DeleteAllPrintJobs", acViewNormal, acEdit
End If
If Spec = "PROCESSES" Then
DoCmd.OpenQuery "DeleteAllProcesses", acViewNormal, acEdit
End If
If Spec = "SCHEDJOBS" Then
DoCmd.OpenQuery "DeleteAllSchedJobs", acViewNormal, acEdit
End If
If Spec = "SESSIONS" Then
DoCmd.OpenQuery "DeleteAllSessions", acViewNormal, acEdit
End If
If Spec = "SHARES" Then
DoCmd.OpenQuery "DeleteAllShares", acViewNormal, acEdit
End If
If Spec = "USERDETAILS" Then
DoCmd.OpenQuery "DeleteAllUserDetails", acViewNormal, acEdit
End If
If Spec = "USERS" Then
DoCmd.OpenQuery "DeleteAllUsers", acViewNormal, acEdit
End If
If Spec = "ADOBJECTLIST" Then
DoCmd.OpenQuery "DeleteAllADObjectList", acViewNormal, acEdit
End If
End If
DoCmd.TransferText acImportDelim, Spec, Spec, File, True
Cmd = "CMD.EXE /x /c DEL " + File
Shell (Cmd)
If (Len(Report) > 0) Then
DoCmd.OpenReport Report, acViewPreview
Else
Quit
End If
End Function
Function RunAdReport()
Dim Cmd, File, Report, Spec As String
Dim Position, Position2 As Integer
' Check value returned by Command function.
Cmd = Command
If Len(Cmd) = 0 Then
MsgBox ("No command line specified; unable to run report")
Exit Function
End If
' find the name of the import file...
Position = InStr(Cmd, "/IMPORT=")
' add 8 to position for length of "/IMPORT="
Position = Position + 8
Position2 = InStr(Position, Cmd, ";")
File = Mid(Cmd, Position, Position2 - Position)
' now find the name of the report to run...
Position = InStr(Cmd, "/TABLE=")
' add 8 to position for length of "/TABLE="
Position = Position + 7
Position2 = InStr(Position, Cmd, ";")
Report = Mid(Cmd, Position, Position2 - Position)
' now find the option to delete/append the existing file...
Position = InStr(Cmd, "/NOAPPEND;")
If Position > 0 Then
On Error Resume Next
DoCmd.DeleteObject acTable, Report
End If
DoCmd.TransferText acImportDelim, , Report, File, True
Cmd = "CMD.EXE /x /c DEL " + File
Shell (Cmd)
If (Len(Report) > 0) Then
DoCmd.OpenTable Report
Else
Quit
End If
End Function
Comment