Recent content by TUSSFC

  1. T

    Exporting memo fields to Excel via VBA

    A workaround I've gone for is creating another "Action_Updates" table ... instead of having x number of updates in a single memo field - I have a record for each update in a relational table. It was probably the method I should have used anyway. In any case ... I'd still be interested in...
  2. T

    Exporting memo fields to Excel via VBA

    I've got some VBA code to build an Excel file on the fly and generate with data from my access tables. The code breaks when I try to export a memo field which is too long (haven't had time to character count yet - I'm thinking its over 256. I've made the data small to test and it works fine...
  3. T

    Creating chart in excel from Access

    Doh, no need for i = i + 1 Sweet. Remove that from my code above and it works lovely. It loops through worksheets and adds a chart on each. Sets a series for each row dynamically.
  4. T

    Creating chart in excel from Access

    Woohoo ... it's been a day of tinkering and i'm getting cloooooser :-) I seem to be talking to myself in this thread, but hopefully this trial and error might be of use to others at some point. Anyway. I'm now up to using this code: Do Until .SeriesCollection.Count = 0...
  5. T

    Creating chart in excel from Access

    Hmm. I've tried this snippet of code: With .SeriesCollection(1) .XValues = xlSheet.Range("=" & strStatCat_Title & "!$B$1:$U$1") End With Dim cNumCols As Integer Dim cNumRows As Integer Dim i As Integer cNumCols = 20 cNumRows = 5 'just using to test...
  6. T

    Creating chart in excel from Access

    Thanks for the pointer. I've made an "ok" start. My code is creating the chart object itself, setting the correct chart type and the correct data range. However ... it is not plotting any data. I need to set the following: X Axis Labels - set to range =$B$1:$U$1 (this will never change)...
  7. T

    Creating chart in excel from Access

    I've been googling like mad. There's plenty of info on creating charts in access reports ... but here's what I need to do. 1 Excel Workbook 1 Worksheet 1 table of data I already have this worksheet opened via other VBA in my Access database (i've been exporting a query to the excel file and...
  8. T

    Runtime error 462 with Excel

    Hi I got it to work another way: objExcel.Selection.Insert Shift:=xlDown needed the Excel object reference. Also fixed the excel.exe open process which had been hanging around which makes sense. Thanks anyway :-)
  9. T

    Runtime error 462 with Excel

    Thanks for the reply. I seem to be getting somewhere. I am still getting the same error - but further on in the code. It now highlights this row: Selection.Insert Shift:=xlDown I must say I was unsure about this syntax as I copied it from the Excel macro recorder. Do I need to prefix this...
  10. T

    Runtime error 462 with Excel

    I'm exporting the contents of a query to an excel file, opening the file and attempting to make some basic modifications to it. Then saving and closing the file. I'm have INTERMITTENT issues - sometimes the export and modifications works fine without any errors. Sometimes I get runtime error...
  11. T

    Export query to excel range on the fly

    Thanks for the reply. I think I've managed to do what i need by creating a cross-tab query. I'll admit, i've done a lot of VBA, etc, in access but never touched cross-tab's. Seems to do what I need nicely :-) Thanks for your time though!
  12. T

    Export query to excel range on the fly

    Hi Thanks for the reply. I can't state a specific cell range, as I don't know how many Stat Types there will be. There will always be 20 days going horizontally across but the number of StatTypes may be 10 for 1 month. And upon running the export a month later may be 15 (rows). How can I...
  13. T

    Export query to excel range on the fly

    I have a query which pulls the following fields from 3 related tables: Stat_Date StatType_Title Stat_Data The number of records this query will return will ALWAYS be 20 records. I need to export this data to excel, specifically into a cell range as follows: Stat_Date as the X axis (from...
  14. T

    Populate combo with list of form names

    Ah, easier than I realised. Just needed to create a query: SELECT MSysObjects.Name FROM MSysObjects WHERE (((MSysObjects.Type)=-32768)) ORDER BY MSysObjects.Name;
  15. T

    Populate combo with list of form names

    I'd like to populate a combo with a list of all the form names in my database. Can anyone help? TIA
Top Bottom