A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.
One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.
Code is as follows: Dim RSLocation As Recordset Dim location As String Dim sqlstring As String Dim RSReports As ADODB.Recordset Dim query As String Dim file As String DoCmd.Hourglass True DoCmd.SetWarnings False Set RSLocation = CurrentDb.OpenRecordset("ReportLocation") If RSLocation.RecordCount = 0 Then MsgBox ("No location is present in the Report Location table") Exit Function End If RSLocation.MoveFirst location = RSLocation.Fields(1).Value RSLocation.Close Set RSLocation = Nothing If Right(location, 1) <> "\" Then location = location + "\" End If '2 Move through the OutputReport table and select records with print flag set sqlstring = "select QueryName, ReportName from OutputReport where Print= -1" Set RSReports = New ADODB.Recordset RSReports.CursorLocation = adUseClient RSReports.Open sqlstring, CurrentProject.Connection, adOpenForwardOnly, adLockReadOnly If Not (RSReports.EOF) And Not (RSReports.BOF) Then RSReports.MoveFirst While RSReports.EOF = False And RSReports.BOF = False query = RSReports.Fields(0).Value file = location + RSReports.Fields(1).Value On Error GoTo PrintError '3 Check to see if the file exists - if so remove (kill it) If Dir(file) <> "" Then Kill file End If '4 Run the Report DoCmd.OutputTo acOutputQuery, query, acFormatXLS, file, False RSReports.MoveNext Wend '5 Tidy up RSReports.Close Set RSReports = Nothing DoCmd.Hourglass False DoCmd.SetWarnings True MsgBox "Report out Completed", vbInformation Exit Function PrintError: If Err.Number = 53 Then Resume Next Else: MsgBox (Err.Description) End If DoCmd.Hourglass False DoCmd.SetWarnings True End Function
|Need guidance with Access on how to compare old table with new table and spit out unmatched report||4||32|
|Record with #Error||8||33|
|Access 2016 Query with Proper Case logic||2||32|
|Strategy for Reporting Crosstab Query w/ Changing Column Headings||12||40|