User Profile

Collapse

Profile Sidebar

Collapse
CoreyReynolds
CoreyReynolds
Last Activity: Jun 1 '10, 05:26 AM
Joined: Nov 11 '09
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • CoreyReynolds
    started a topic Help with mixed up data in query

    Help with mixed up data in query

    Hello,

    I've been looking at this for probably five hours now and I'm loosing my mind.

    I'll start by just showing my end result of this query of mine, since it illustrates the problem.

    Here is my Database structure:



    I'm trying to get a huge datadump out of it. It's confusing but it's posted below. It's confusing enough that let me just quickly mention the problem. the tblCompChange...
    See more | Go to post

  • Well, we'll just leave it at that and close the topic with hopes that some day they finally come out with the magic VBA fairies that make data input and output seamless, GUI based, flexible and simple to use.
    See more | Go to post

    Leave a comment:


  • Thank you for the detailed reply. I had no idea about snapshots and I'll take a look at that in the future. I am using Access 2007

    They do from time to time want to do things with numbers themselves... so a PDF or snapshot might not be the best possible solution. Selecting everything and copy and pasting actually leaves it in a reasonable format that I think I could just leave as is, to bad it doesn't like like there is really a way...
    See more | Go to post

    Leave a comment:


  • CoreyReynolds
    started a topic Prettier export from Access Report to Excel

    Prettier export from Access Report to Excel

    Hello (again),

    I quickly want to preface this by saying you all really have no idea how much I appreciate all the help I have received from this forum. You really are all just the best kind of people and are helping me more than you'll ever realize. Thank you!

    I have a report that I have tried using OutputTo to export to excel:
    Code:
    DoCmd.OutputTo acOutputReport, "rptHourlyPercentage", acFormatXLS, , Tr
    ...
    See more | Go to post

  • CoreyReynolds
    replied to Saving Dates, M/D/Y H:M:S
    I swapped out my "Date" with Now() and specified the format and it worked.

    So basically both of your solutions combined worked :)

    Thanks to both of you!
    See more | Go to post

    Leave a comment:


  • CoreyReynolds
    started a topic Saving Dates, M/D/Y H:M:S

    Saving Dates, M/D/Y H:M:S

    Hello,

    I have been running an SQL Insert to save some data into a table, here is the applicable snippet of the tail end of that insert where the date is added:

    Code:
    finalString = finalString & "'" & addString & "', '" & Format(Now, "MM/DD/YY hh:mm:ss") & "')"
    It will only save the date as MM/DD/YYYY format in the access table though, but I need greater...
    See more | Go to post

  • Thanks TheSmileyOne, that's actually what I am talking about.
    You're right though - I'm not sure how exactly to put the code into it. I'll keep looking for that and I'll post back here if I find anything (before anyone else does).


    Btw - if this is possible. Wouldn't it be cool to create an accessVBA app that opens an ExcelVBA app that opens an accessVBA app? Tiers of awesome :)!

    Well, leaving the country...
    See more | Go to post

    Leave a comment:


  • Generating a spreadsheet from Access Data with a macro built in

    Hello,

    I currently have a VBA that vomits a bunch of data into a neat little Excel spreadsheet from my Access 2007 database app to distribute to my managers.

    There's a couple macros that would be handy to have in this spreadsheet for them to use... is it possible programatically to insert an Excel Macro into the Excel spreadsheet that I am creating in VBA in access?
    See more | Go to post

  • CoreyReynolds
    started a topic Trying to keep certain units together

    Trying to keep certain units together

    Hello, so I'm not sure how to go about this.

    My table is below: Each piece of equipment we have has an equipmentID, and can have multiple Compartments (parts in the machine), which are dueIn (due to be inspected) in a certain number of hours of use.

    So, I want to go through the list, find the lowest "dueIn" reading for a piece of equipment with the Compartment "Engine", list it first, then all of...
    See more | Go to post

  • CoreyReynolds
    started a topic Redeclaring Array length for storage

    Redeclaring Array length for storage

    Hey all, little problem here, I'll post the code first:

    Code:
    Dim foundArr() As String
    
    'Start of loop
    
    If InStr(Join(foundArr), sh.Cells(searchRow, "B")) = 0 Then
    
    'inconsequential code that I know works.
    
    ReDim Preserve foundArr(UBound(foundArr) + 1) As String
    foundArr(UBound(foundArr)) = Replace(sh.Cells(searchRow, "B"), "-", "")
    ...
    See more | Go to post

  • Sorry about the code - the option wasn't there (I'm not sure why).
    I did figure out what the issue was - when I changed an option in the designer Access kind of just went "Well look at all this ugly code! Let me clean it up for you!" and did something that made it work in the process of reorganizing. That "thing" was a parenthesis issue. I just figured out what it did and changed it into my code.

    I also updated...
    See more | Go to post

    Leave a comment:


  • Here's my no good code btw:

    (won't let me edit original reply or add code tags to the below, not sure why sorry.

    Code:
    Private Sub btnTrend_Click()
    
    'Create Query
    Dim query As String
    Dim db As Database
    Dim rs As Recordset
    Set db = CurrentDb
    Dim mySql As String
    Dim valSelect As Variant
    Dim strValue As String
    Dim firstEquip As String
    firstEquip = True
    Dim ValSelectE
    ...
    See more | Go to post

    Leave a comment:


  • Access bug? Not displaying query results... kind of.

    Hey all,

    This may be the dumbest thing I've ever seen. I'm creating a queryDef in VBA for access. Here's a sample of the query it creates:

    Code:
    SELECT tblEquipment.equipmentID, tblSample.sampleDate, tblSampleResults.Chromium, IIf([x]=True,'X',(IIf([U]=True,'U',' '))) AS Critical
    
    FROM (((tblEquipment 
    INNER JOIN tblCompartment ON tblEquipment.[equipmentID] = tblCompartment.[equipmentID]) 
    INNER JOIN
    ...
    See more | Go to post

  • You're all so right with the Pivoting. I went back and rebuild some stuff and it's exactly what I needed. Thanks again folks.
    See more | Go to post

    Leave a comment:


  • Runtime Error 1004 "Method Range Of Object Global Failed"

    Hey all,

    I have a piece of code that dumps a bunch of data into a spreadsheet. Also rearranges it into a pivot table and then graphs the pivot table as well so my boss can get a clear view of the data.

    This question is two part. One, I seem to be getting the title error at the starting line stating:
    Code:
            oSheet.Range(rng).Select
             With Selection
                 shp.Left = .Left
    ...
    See more | Go to post

  • I was wondering if there was a mySQL query possible that could organize the data more like the second format I posted.
    See more | Go to post

    Leave a comment:


  • CoreyReynolds
    started a topic Creating VBA Pivot Table from Query

    Creating VBA Pivot Table from Query

    I can't find any information on this.

    If I have an existing query and I want to dump it into a page on a spread sheet and modify it as a pivot table all in VBA, can I do that? I only have the code so far (that works) to dump in the data and create a chart based off it... except I have to manually alter the data I dumped in into a pivot table for the chart to make sense every time.... it sure would be nice if VBA would do it for me!...
    See more | Go to post

  • Unable to create a usefull chart from mySQL Data

    Hello all,

    I have some VB code that spits an Access query out into Excel and attempts to create a chart from it. The problem is it spits it into a format that Excel can't really eloquently make a chart out of, see:

    Code:
    equipmentID	sampleDate	Cu
    26255	11/22/2009	2
    26255	11/23/2009	60
    26255	11/26/2009	5
    26646	11/22/2009	33
    26646	11/24/2009	12
    26646	11/15/2009	1
    ...
    See more | Go to post

  • Excel: Populating a range with a formula

    Hey all,

    Here's the culprit:

    Code:
    Sub PopulateRange(Cell_Range As Range)
    
    Dim v
    Dim i As Long
    Dim j As Long
    Application.ScreenUpdating = False
    ReDim v(1 To Cell_Range.Rows.Count, 1 To Cell_Range.Columns.Count)
    For i = 1 To Cell_Range.Rows.Count
    For j = 1 To Cell_Range.Columns.Count
    
    'only takes last 8 chars of data cell
    v(i, j) = "=RIGHT(G"
    ...
    See more | Go to post

  • After searching for nearly two hours and posting this I find the answer within 10 seconds, FML.


    (In case anyone is googling the same question and finds this)
    .Axes(xlCategor y).CategoryType = xlCategoryScale
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...