Recent content by PatrickJohnson

  1. P

    Utilizing Conditional Formatting in Excel from Access

    I'm trying to apply some conditional formatting to some rows in an excel spreadsheet via access vba code. basically, i have a list of tables, lets say A thru D. I have a routine that exports these tables to separate sheets in an common excel file. I am doing this by looping through a recordset...
  2. P

    Building Excel Pivot Tables in Access

    Thanks for the reply. I will give this a shot. However, I have to admit I don't like sprouting up modules and code in other files. When I run a routine, I would prefer all the code be performed within the Access application. There has to be a better way than remaking a new file every time. And...
  3. P

    Building Excel Pivot Tables in Access

    Nope, same issue: "Do you want to replace the contents of the destination cells in PARAM?" It build the new pivot, but then attempts to place new data on the original sheet. Did the same thing when i tried the same process.
  4. P

    Building Excel Pivot Tables in Access

    So, I have a report I send out monthly. The end user needs both the source data and a pivot table summary, and both must be in Excel. So my thought was to export the source query from Access to an Excel sheet, then use Access vba to build a pivot from the data. Then the problems began. First...
  5. P

    Extract data from Word doc

    easiest way for me was to load the data from the word table(s) in the document into arrays then parse that data into fields on a table. I did it with some help in this thread: http://www.access-programmers.co.uk/forums/showthread.php?p=716286#post716286 Then you can play around with the data all...
  6. P

    Whats wrong with my if statement

    good to know! Thanks! :)
  7. P

    Whats wrong with my if statement

    the "iif" does not work in code, it only works in the design view of queries and in form controls. if this is code, it would be what Bob posted, though i tend to put in ELSE: END IF instead of just End If, but both work fine.
  8. P

    Recordsets

    To answer your question more directly, yes the code needs to be housed in one way or another, either as an argument in the DoCmd.RunSQL part or in a string field. However, you don't have to reassign variables as you have above. If I have a dinky bit of one line SQL code, i do as above...
  9. P

    Question about Word and Excel Behving together...

    I got it to work! I put in the declaration you mentioned, but was still getting some object errors. Here is the code i ended up with, look it over for efficiency if you don't mind. Also, I've got some carriage returns or spaces or something in each field with the data, how do i get rid of...
  10. P

    Question about Word and Excel Behving together...

    Okay, i got an error now when running the above code. When it gets to this line: i = ActiveDocument.tbl.Rows.Count I get an error saying "Object doesn't support this property or method." Any ideas?
  11. P

    Question about Word and Excel Behving together...

    yeah, i did that and that solved my compile error. when you have opportunity though, i would love a better understanding of the best paractice.
  12. P

    Question about Word and Excel Behving together...

    Sorry, i should have been more clear. I haven't gotten around to testing the code you posted until now. Here is how i have it written: Dim wrdapp As Word.Application Dim wrdDoc As Word.Document Set wrdapp = New Word.Application wrdapp.Visible = True Dim path As String Dim i As Integer Dim...
  13. P

    Question about Word and Excel Behving together...

    i'm getting a compile error (type mismatch) on the following part: strArray(x, y) = ActiveDocument.Tables(1).Cell(x, y) any ideas?
  14. P

    Question about Word and Excel Behving together...

    Well, if it were an option to change the formatting of the output i'm receiving, I would have just made it come out in a csv :) Unfortunately the tool that generates the report was written by third party and the company is not interested in the huge fees to have it rewritten when some...
  15. P

    Question about Word and Excel Behving together...

    so just so i'm clear, this is meant to add the data from the rtf directly to an access table, correct? If so, that would certainly reduce the headaches.Arrays are pretty foreign to me though, so while I will likely implement this solution, could you explain in a little more detail what exactly...
Back
Top Bottom