User Profile

Collapse

Profile Sidebar

Collapse
Blake Rice
Blake Rice
Last Activity: Oct 25 '11, 05:20 PM
Joined: Apr 1 '11
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Blake Rice
    replied to Report Width Stuck
    Well I found the rogue line, for anyone interested I used Allen Browne's code
    Code:
    Function FindRogue()
    Dim rpt As Report
    Dim ctl As Control
    Dim strDoc As String
    
    strDoc = "04 - Backlog Report - Valley"
    DoCmd.OpenReport (strDoc), acViewDesign
    Set rpt = Reports(strDoc)
    
    For Each ctl In rpt.Controls
    If ctl.Width > 6.5 * 1440 Then
    Debug.Print ctl.Name,
    ...
    See more | Go to post

    Leave a comment:


  • Blake Rice
    started a topic Report Width Stuck

    Report Width Stuck

    Hi, I have a report that is stuck at 13.675" and it will NOT shrink. It can grow but it will not get any narrower than that. Here is what I have tried, I have looked for any objects that are blocking my report from getting narrow. I have made every section taller to look for any line stragglers, nothing. I have made my report 22" done a ctr-A and deleted EVERY control on my report, nothing. I have selected from 14" to 0" on the...
    See more | Go to post

  • Blake Rice
    started a topic CrossTab as Record Source for a Subreport

    CrossTab as Record Source for a Subreport

    I have a report that is based off of a union query that has some crosstab queries in it. This report runs fine, no problems. I would like to be able to drop this report into another report as a sub-report and have it filter based on one of the parent reports fields. For the life of me I can't get it to work. I have tried to use the field as a criteria in the union query but get the error that the Jet Engine doesn't recognize that field. I have tried...
    See more | Go to post

  • Blake Rice
    replied to SQL Transform Statement
    HA! that is brilliant! I should have thought about that. That did the trick for sure. Thank you so much for your help! Now I will be posting another SQL question on the main site ...

    For those interested final code was:
    Code:
    TRANSFORM Sum(Backlog.Volume) AS SumOfVolume   
    SELECT Backlog.SupplyingCompanyID, Sum(Backlog.Volume) AS [Total Of Volume]   
    FROM Backlog
    WHERE Year([MonthEnding]) = Year(Date())
    ...
    See more | Go to post

    Leave a comment:


  • Blake Rice
    replied to SQL Transform Statement
    Then could you explain why this code would work?

    Code:
    TRANSFORM Sum(Backlog.Volume) AS SumOfVolume  
    SELECT Backlog.SupplyingCompanyID, Sum(Backlog.Volume) AS [Total Of Volume]  
    FROM Backlog  
    GROUP BY Backlog.SupplyingCompanyID  
    PIVOT Format([MonthEnding],"mmm 'yy") In ("Jan '11", "Feb '11","Mar '11","Apr '11","May '11","Jun '11","Jul
    ...
    See more | Go to post

    Leave a comment:


  • Blake Rice
    replied to SQL Transform Statement
    Thank you for your reply! But I am not sure I understand you, what do you mean when you say it does it automatically? I have seen some examples for using IN clause after PIVOT.

    For example:
    Code:
    TRANSFORM Sum(Backlog.Volume) AS SumOfVolume 
    SELECT Backlog.SupplyingCompanyID, Sum(Backlog.Volume) AS [Total Of Volume] 
    FROM Backlog 
    GROUP BY Backlog.SupplyingCompanyID 
    PIVOT Format([MonthEnding],"mmm
    ...
    See more | Go to post

    Leave a comment:


  • Blake Rice
    started a topic SQL Transform Statement

    SQL Transform Statement

    Please help make this work, I have tried any number of different ways to escape the quotes and not one of them has worked.

    It always comes up with a Syntax error, which tells me that I am just not trying it properly and HOPEFULLY someone out there will know the correct syntax

    Code:
    TRANSFORM Sum(Backlog.Volume) AS SumOfVolume
    SELECT Backlog.SupplyingCompanyID, Sum(Backlog.Volume) AS [Total Of Volume]
    ...
    See more | Go to post

  • Blake Rice
    replied to Creating a Dynamic Chart in a Form
    I still haven't been able to figure this one out, any help would be much appreciated.
    See more | Go to post

    Leave a comment:


  • Blake Rice
    replied to Creating a Dynamic Chart in a Form
    Ok, here is the code. Is there anyway within this SQL to make it so the Graph always shows Jan - Dec even if there isn't a value to plot?

    Code:
    Me.grphBacklog.RowSource = "SELECT (Format([MonthEnding],""MMM 'YY"")) AS Expr1, Sum(Backlog.Volume) AS SumOfVolume " & _
                            "FROM Backlog " & _
                            "WHERE (Backlog.MonthEnding) BETWEEN #"
    ...
    See more | Go to post

    Leave a comment:


  • Blake Rice
    replied to Creating a Dynamic Chart in a Form
    Dynamic Charts in VBA

    Ok, so I have figured out how to make the chart on the form dynamic, so that it reflects the data that is displayed on the form. Who knew that the chart object would have a .rowsource property? Change that in VBA and voila.

    My only problem now is that some years do not have full backlog dates, that is that some months do not show up on the chart when there isn't corresponding values in the table....
    See more | Go to post

    Leave a comment:


  • Blake Rice
    started a topic Creating a Dynamic Chart in a Form

    Creating a Dynamic Chart in a Form

    Here is my question, and really, all I would like is to know is if 1) Is this possible? and 2) What is some good reading to get me up to speed on this subject.

    I have a form that draws its records from a table. It's fields consists of a PK(autonumber), a projectID (links to a project), a month ending date (this is the last day of the month, and a volume (the volume that is being done in the month.

    The form acts like...
    See more | Go to post

  • Hey NeoPa, that seemed to do the trick, I am still fiddling around with the entire script so I wont post it here just yet, but running the Set objExcel command after the OutputTo() command resulted in the Excel macro running on the open Excel application. I wasn't able to get the Workbooks(SpreadsheetName) code to work, but the Excel macro ran just the same without it.

    Like I said I will come back to this post and post the code that...
    See more | Go to post

    Leave a comment:


  • Thanks for the reply. I was wondering that same thing with regards to taking control of an already open XL object. My first attempt to involved the code:

    Code:
    DoCmd.OutputTo acOutputReport, "qryBackLogWithActuals", acFormatXLS, "TEST_1.xls", True
    Where the [autostart] argument of the .OutputTo method was flagged as true. When that line of code finished running I was left with an open XL workbook with...
    See more | Go to post

    Leave a comment:


  • Hi Neo Pa,

    Thanks for the reply.

    After reading the link, here is my second attempt at the code.

    Code:
    Private Const conAppNotRunning As Long = 429 
    
    ...
    
    Private Sub cmdRunXL_Click() 
    On Error GoTo Err_cmdRunXL_Click
        Dim objExcel As Excel.Application 
      
        On Error Resume Next 
            Set objExcel = GetObject(, "Excel.Application")
    ...
    See more | Go to post

    Leave a comment:


  • Run an Excel macro after exporting an Access report

    Hi everyone,

    Simple question, I would like a button in my Access application to export a report to excel, then run an excel macro that is stored in PERSONAL.XLS so that it is seemless. Here is the feble attempt that I have made thus far.

    Code:
    Private Sub cmdRunXL_Click()
    On Error GoTo Err_cmdRunXL_Click
        Dim XL As Excel.Application
        
        DoCmd.OutputTo acOutputReport, "qryBackLogWithActuals",
    ...
    See more | Go to post

  • @NeoPa and ADezii -
    I am amazed at the help that I received from you guys. I was able to implement the solution that you suggested and I am moving on in creating the application. I know that I will have more questions in the future, and I know where to come, but I really do appreciate your help.

    Thank You

    Blake Rice
    See more | Go to post

    Leave a comment:


  • @ADezii
    Thank you very much for your help, I cant wait to get back to the office and try that approach. It looks like it should work. I realize that there hasn't been any error checking or data validation added just yet, but I was trying to be able to add these groups of records first. I was having a difficult time working with the SQL and, I am just learning the Access environment. I will have to look into DAO.recordsets more. I see that...
    See more | Go to post

    Leave a comment:


  • Thank you Hype261,

    Turning the warnings off did achieve the desired result and is now my best solution for this problem.

    I tried to make the code that you wrote work but because the values are not coming from any table I dont know what do put after the FROM clause. Also since the values are all coming from text boxes on the form I am not sure how to, 1: Collect all the ones that are visible, and, 2. Attach the same project...
    See more | Go to post

    Leave a comment:


  • Insert multiple records in Access 2003 using one INSERT statement

    Hi everyone! This is my first time posting here, so here goes.

    THE SITUATION:
    I have a form that has a start date, end date, project number, and total volume. These values are pulled from another form. Then depending on the difference between the start and end dates, that number of text boxes have their visibility set to TRUE and are displayed on the form. The user then enters volumes for each of the months between the start date...
    See more | Go to post
    Last edited by NeoPa; Apr 2 '11, 01:13 PM. Reason: Please use the [code] tags provided.
No activity results to display
Show More
Working...