Advertisement
Advertisement
| 09.10.2008 at 01:29PM PDT, ID: 23720819 |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: 80: 81: 82: 83: 84: 85: 86: 87: 88: 89: 90: 91: 92: 93: 94: 95: 96: 97: 98: 99: 100: 101: 102: 103: 104: 105: 106: 107: 108: 109: 110: 111: 112: |
Option Compare Database
Private Sub btnClose_Click()
DoCmd.Close
End Sub
Private Sub Report_Load()
Dim enterprise_id As Integer
Dim company_id As Integer
Dim analyst_id As Integer
Dim beginDate As String
Dim endDate As String
Dim show_complete As Boolean
Dim show_incomplete As Boolean
Dim strSQL As String
Dim strFilter As String
Dim strOrderBy As String
Dim lengthFilter As Integer
Dim lengthOrderBy As Integer
Dim spot As Integer
Dim args As String
Dim strCompleteOrderBy As String
Dim strCompleteFilter As String
strFilter = [Forms]![Filing_Calendar].fSubFilingCalendar.Form.Filter
strCompleteFilter = strFilter
lengthFilter = Len(strFilter)
If lengthFilter > 0 Then
args = strFilter
spot = InStrRev(strFilter, ".")
strFilter = Trim(Left(Right(strFilter, lengthFilter - spot), (lengthFilter - spot) - 1))
End If
spot = 0
strOrderBy = [Forms]![Filing_Calendar].fSubFilingCalendar.Form.OrderBy
strCompleteOrderBy = strOrderBy
lengthOrderBy = Len(strOrderBy)
If lengthOrderBy > 0 Then
If lengthFilter > 0 Then
args = args & "," & strOrderBy
Else
args = strOrderBy
End If
spot = InStrRev(strOrderBy, ".")
strOrderBy = Trim(Right(strOrderBy, lengthOrderBy - spot))
End If
With Reports("Filing Calendar Report 1")
.Filter = [Forms]![Filing_Calendar].fSubFilingCalendar.Form.Filter
'.Filter = strFilter
.OrderBy = [Forms]![Filing_Calendar].fSubFilingCalendar.Form.OrderBy
'.OrderBy = strOrderBy
End With
[Forms]![Filing_Calendar]!txtBeginDate.SetFocus
If [Forms]![Filing_Calendar]!txtBeginDate.Text <> "" Then
beginDate = [Forms]![Filing_Calendar]!txtBeginDate.Text
End If
[Forms]![Filing_Calendar]!txtEndDate.SetFocus
If [Forms]![Filing_Calendar]!txtEndDate.Text <> "" Then
endDate = [Forms]![Filing_Calendar]!txtEndDate.Text
End If
strSQL = "SELECT filing_detail.filing_detail_id,state.abbreviation, filing_jurisdiction.filing_jurisdiction_name, filing_jurisdiction.filing_jurisdiction_id, filing_detail.tax_year, filing_detail.return_due_date, filing_detail.return_approved, filing_detail.who_approved, filing_detail.mail_date, filing_detail.certified, filing_detail.extension_filed, filing_detail.extended_due_date, enterprise.enterprise_name, company.company_name, site.site_name,site.site_id,site.site_code, analyst.last_name, analyst.first_name " & _
" FROM ((enterprise INNER JOIN company ON enterprise.[enterprise_id] = company.[enterprise_id])" & _
" INNER JOIN (site INNER JOIN ((state INNER JOIN filing_jurisdiction ON state.[state_id] = filing_jurisdiction.[state_id])" & _
" INNER JOIN filing_detail ON filing_jurisdiction.[filing_jurisdiction_id] = filing_detail.[filing_jurisdiction_id]) ON site.[site_id] = filing_detail.[site_id]) ON company.[company_id] = site.[company_id])" & _
" LEFT JOIN (analyst_company LEFT JOIN analyst ON analyst.[analyst_id] = analyst_company.[analyst_id]) ON company.[company_id] = analyst_company.[company_id]"
If [Forms]![Filing_Calendar].chkShowIncomplete = True And [Forms]![Filing_Calendar].chkShowComplete = False Then
strSQL = strSQL & " WHERE filing_detail.return_approved=false"
End If
If [Forms]![Filing_Calendar].chkShowIncomplete = False And [Forms]![Filing_Calendar].chkShowComplete = True Then
strSQL = strSQL & " WHERE filing_detail.return_approved=true"
End If
If [Forms]![Filing_Calendar].chkShowIncomplete = True And [Forms]![Filing_Calendar].chkShowComplete = True Then
strSQL = strSQL & " WHERE filing_detail.return_approved=true OR filing_detail.return_approved=false"
End If
If [Forms]![Filing_Calendar].cboEnterprise <> "" Then
strSQL = strSQL & " AND enterprise.enterprise_id=" & [Forms]![Filing_Calendar]!cboEnterprise & ""
End If
If [Forms]![Filing_Calendar].cboCompany <> "" Then
strSQL = strSQL & " AND company.company_id=" & [Forms]![Filing_Calendar]!cboCompany & " AND site.company_id=" & [Forms]![Filing_Calendar]!cboCompany & ""
End If
If [Forms]![Filing_Calendar].cboAnalyst <> "" Then
strSQL = strSQL & " AND analyst_company.analyst_id=" & [Forms]![Filing_Calendar]!cboAnalyst & ""
End If
If [Forms]![Filing_Calendar].cboState <> "" Then
strSQL = strSQL & " AND filing_jurisdiction.state_id=" & [Forms]![Filing_Calendar]!cboState
End If
If [Forms]![Filing_Calendar].cboTaxYear <> "" Then
strSQL = strSQL & " AND filing_detail.tax_year=" & [Forms]![Filing_Calendar]!cboTaxYear
End If
If lengthFilter > 0 Then
strSQL = strSQL & " AND " & strFilter
End If
If beginDate <> "" And endDate <> "" Then
strSQL = strSQL & " AND filing_detail.return_due_date >=#" & beginDate & "# AND filing_detail.return_due_date <=#" & endDate & "#"
End If
If lengthOrderBy > 0 Then
strSQL = strSQL & " ORDER BY " & strOrderBy
Else
strSQL = strSQL & " ORDER BY enterprise.enterprise_name,company.company_name,site.site_name,filing_detail.return_due_date ASC;"
End If
Report.OrderBy = strCompleteOrderBy
Me.OrderByOn = True
Report.Filter = strCompleteFilter
Me.FilterOn = True
Report.RecordSource = strSQL
End Sub
|