Search results

  1. jeran042

    Nested REPLACE Functions

    Good morning all, I have a question. I have a field on my form that picks up the forms filter. =[Forms]![frm: Report Creator]![frm:Ledger_Detail_Reports_Subform].[Form].[Filter] Originally, it was not intended to be a visible field, only meant to be a reference in some VBA code. However...
  2. jeran042

    Docmd.OpenFrom & SQL WHERE Clause

    The line "2-> (A OR B OR C) AND D" was exactly it. The parentheses fixed my problem! Final code: Private Sub txtSubscriptions_Click() Dim sWhere As String Dim sDepartment As String sDepartment = DLookup("DEPARTMENT", "qryDepartment", "COST_CENTER= " & [txtCost_PROGRAM]) sWhere =...
  3. jeran042

    Docmd.OpenFrom & SQL WHERE Clause

    I can use someone's keen eye to help me troubleshoot my WHERE clause. Here is what I have for code: Private Sub txtSubscriptions_Click() Dim sWhere As String Dim sDepartment As String sDepartment = DLookup("DEPARTMENT", "qryDepartment", "COST_CENTER= " & [txtCost_PROGRAM]) sWhere =...
  4. jeran042

    Calling a Function

    Thank you very much for your help!
  5. jeran042

    Calling a Function

    Thank you, and you are correct, I failed to post this code: Private Declare Function SHFileOperation Lib "shell32.dll" Alias _ "SHFileOperationA" (lpFileOp As SHFILEOPSTRUCT) As Long Private Declare Function PathIsNetworkPath Lib "shlwapi.dll" _ Alias "PathIsNetworkPathA" ( _ ByVal...
  6. jeran042

    Calling a Function

    Good morning all, I found a function that I think can be very useful for me, although, Im not sure how to call it in a procedure. Here is the function: Public Function Recycle(FileSpec As String, Optional ErrText As String) As Boolean...
  7. jeran042

    Appending Multiple File to Multiple Tables

    I ended up working my way through this problem. I wanted to post an answer in case anyone else needs to do something similar: Private Sub Command24_Click() 'Error handling On Error GoTo Error_Handler Dim dbs As DAO.Database Dim tbl As DAO.TableDef Dim...
  8. jeran042

    Appending Multiple File to Multiple Tables

    Is possible through an array to append a specific excel file to a specific table? Here is what I current have for code: Private Sub Command24_Click() 'Error handling On Error GoTo Error_Handler Dim dbs As DAO.Database Dim tbl As DAO.TableDef Dim iResponse As Integer...
  9. jeran042

    Loop through Reports, Output as PDF

    Markk, I believe I know why I am not achieving the desired output. All of the formulas in the report all reference an unbound textbox called "txtCost_Center" Example: =Round(Nz(DSum("[DEBIT]","qryLedger_Detail","[COST_CENTER]=txtCOST_CENTER" & " And [CATEGORY]='TEMPORARY...
  10. jeran042

    Loop through Reports, Output as PDF

    Markk, I'm not sure how I would post this DB without an enormous amount of sanitation. I'm almost sure that something else (more than likely my own error) is going on, and I suppose my next move is to find out what that is before I ask you to put forth any more effort. As it stands now, you...
  11. jeran042

    Count the record source of an open Report

    My apologies, I stand corrected, I tried this and it in fact worked, Private Sub Command23_Click() Dim strFormName As String Dim myPath As String Dim iDepartment As Long Dim sReportName As String Dim sDepartment As String Dim sRecordSource...
  12. jeran042

    Count the record source of an open Report

    But my problem was that it was always going to show, because it would be reading the total number of records in the unfiltered query. Adding the filter to the IF statement sorted that out. However, I was unfamiliar with the .HasData Property before this post, and I'm sure that I will find a...
  13. jeran042

    Count the record source of an open Report

    Spot on, that worked perfectly. Your the man! :D
  14. jeran042

    Loop through Reports, Output as PDF

    It isn't, its holding the "TempVars!COST_CENTER" (800) And while its outputting, it is giving the name of a third cost_center. The Department name (my only guess as to why I would see this name) is the second department on the list I only think its that is because in some other loops I use...
  15. jeran042

    Loop through Reports, Output as PDF

    The loop is running, however I am still having trouble with the line: With CurrentDb.OpenRecordset(SQL) Do While Not .EOF TempVars!COST_CENTER = .Fields(0).Value As "TempVars!COST_CENTER" is returning 1 cost_center and ".Fields(0).Value[/CODE]" is returning another. So...
  16. jeran042

    Count the record source of an open Report

    I have a function that will output a report to a specified folder, and what I am trying to do is count the number of records before the report is exported, so if there are 0, I do not want to oputput anything. Seems easy enough, and I thought I was accounting for this in my code. The problem...
  17. jeran042

    Loop through Reports, Output as PDF

    I changed the SQL to match: SELECT qryDepartmentActive.COST_CENTER FROM qryDepartmentActive I only need the [COST_CENTER] as everything on the report is based on calculations
  18. jeran042

    Loop through Reports, Output as PDF

    My record source is: SELECT TBL_DEPARTMENT.COST_CENTER FROM TBL_DEPARTMENT WHERE COST_CENTER = TempVars!COST_CENTER; In addition I notices that in the line: TempVars!COST_CENTER = .Fields(0).Value I see that the TempVars side has one [COST_CENTER] and the .Fields has another?
  19. jeran042

    Loop through Reports, Output as PDF

    Mark, First off, thank you for your reply, This is close I had to add the ".value" to the line: TempVars!COST_CENTER = .Fields(0) as I was getting a Runtime error 32538 So, the code runs, and I do see the [COST_CENTER] being stored in the TempVars within the code, but I don't believe it...
  20. jeran042

    Loop through Reports, Output as PDF

    Is this something that can be handled with OpenArgs?
Back
Top Bottom