Advertisement
Advertisement
| 05.14.2008 at 12:46PM PDT, ID: 23402883 |
|
[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: |
Filter Routine:
Public Function Filter(ByVal int_Field As ReturnedTransactions, ByVal int_Filter As gt_Filter, ByVal str_OnCriteria As String) As Boolean
Dim str_Filter As String
Select Case int_Filter
Case 0: str_Filter = " = '" & str_OnCriteria & "'"
Case 1: str_Filter = " < '" & str_OnCriteria & "'"
Case 2: str_Filter = " <= '" & str_OnCriteria & "'"
Case 3: str_Filter = " > '" & str_OnCriteria & "'"
Case 4: str_Filter = " >= '" & str_OnCriteria & "'"
Case 5: str_Filter = " <> '" & str_OnCriteria & "'"
Case 6: str_Filter = " LIKE '*" & str_OnCriteria & "*'"
Case Else: Exit Function
End Select
RSet_Returned.Filter = str_ReturnField(int_Field) & str_Filter
Select Case RSet_Returned.RecordCount
Case Is > 0: Filter = True
Case Else: Filter = False
End Select
End Function
Query:
Public Sub GetTransactions()
Dim int_SheetRow As Integer: int_SheetRow = 2
With wks_testData.Cells
.ClearContents
.ClearFormats
End With
With cls_GetTrans
.NewSearch
.SetValue gt_AccountID, "00000000"
.SetValue gt_ByDate, "True" '
.SetValue gt_FromDate, "05/09/08"
.SetValue gt_ToDate, "05/12/08"
.SetValue gt_RetrieveAllTransactions, "True"
If Not .ExecuteSearch Then MsgBox "No records were found", vbOKOnly, "No Records ": Exit Sub
'this is where I need to be able to filter on multiple items. The second one overwrites the first.
'Is there a way to use an AND to combine multiple filter statements
.Filter gt_DCCode, gt_IsEqual, "True"
'.Filter gt_AType, gt_IsNotEqual, "XXXXX"
.Save_ToFile "C:\Temp\Transactions.txt"
'Add the Headers to the sheet here
Do Until .Returned_EOF
wks_testData.Cells(int_SheetRow, "A") = .Returned(gt_ANumber)
wks_testData.Cells(int_SheetRow, "B") = .Returned(gt_ExecDate)
wks_testData.Cells(int_SheetRow, "C") = .Returned(gt_Qty)
wks_testData.Cells(int_SheetRow, "D") = .Returned(gt_Description1)
wks_testData.Cells(int_SheetRow, "E") = .Returned(gt_TAmount)
wks_testData.Cells(int_SheetRow, "F") = .Returned(gt_Symbol)
wks_testData.Cells(int_SheetRow, "G") = .Returned(gt_EffDate)
wks_testData.Cells(int_SheetRow, "H") = .Returned(gt_TSourceCode)
wks_testData.Cells(int_SheetRow, "I") = .Returned(gt_SNumber)
wks_testData.Cells(int_SheetRow, "J") = .Returned(gt_Com)
wks_testData.Cells(int_SheetRow, "K") = .Returned(gt_DrCrCode)
int_SheetRow = int_SheetRow + 1
.Returned_MoveNext
Loop
End With
wks_testData.Cells.EntireColumn.AutoFit
End Sub
|