Search results

  1. J

    Add VB Code to Excel Spreadsheet from within Access

    It occurred on the following line: x1.ActiveWorkbook.VBProject.VBComponents(x1.Sheets("Sheet1").CodeName).CodeModule.AddFromString shtCode I have solved it! I did a search on "CodeName).CodeModule.AddFromString " and found lots of discussion. I had to add another library reference called "...
  2. J

    Add VB Code to Excel Spreadsheet from within Access

    Greetings, I have a form that creates an "Excel.Application" object, creates a button on the first sheet ("Sheet1"), and adds an "OnAction" module for the button. The code gets so far as adding the button, but when I try to add the CodeModule, I get a Run-time error '9', saying subscript out...
  3. J

    Repaint Method Stops Working On Form

    Greetings, I have a routine that loops through about 100,000 records for water wells over a time frame of 36 years. For each two month interval, it checks for the Well Type (Domestic, Irrigation, etc.) and does a running total for each Well Type for the two month interval. Then those running...
  4. J

    objFso.Drive(name).ShareName Not Working

    I have a function that uses File System Object to get the actual network name of a drive. Today, a remote user had it crash when I tried to return the Sharename. Code: Function GetUNC(LocalPath As String) As StringMsgBox ("GetUNC Function")Dim objFso As FileSystemObjectSet objFso = New...
  5. J

    Want To Move Excel Chart to Last Tab Using Access VBA

    I realized my last post didn't explicitly address the issue regarding placing a chart on a sheet and then placing the sheet at the end. This is the code that worked for me for puyying the chart on the last sheet: x1.Charts.Add x1.ActiveChart.Location WHERE:=xlLocationAsNewSheet...
  6. J

    Want To Move Excel Chart to Last Tab Using Access VBA

    Thanks, Sean, for the suggestion. This is the code that finally worked for me: 'Add a sheet for MeasurementData. x1.Worksheets.Add().Name = "WellMeasurementData" x1.ActiveSheet.Move After:=x1.Sheets(x1.Sheets.Count) Jonathan Mulder Engineering Geologist California Department of Water Resources
  7. J

    Want To Move Excel Chart to Last Tab Using Access VBA

    Thanks for your input, Sean. And I really like your tag line! Based on your suggestions, I tried the following code but still get the "move method of chart class failed" error: x1.Charts.Add x1.ActiveChart.Location Where:=xlLocationAsNewSheet, Name:=strWellName x1.Sheets(strWellName).Move...
  8. J

    Want To Move Excel Chart to Last Tab Using Access VBA

    Greetings, I've been struggling with this for a few hours and need to reach out. I am creating Excel charts in Access. I have creating an Excel application object (if that's the right terminology) named as "x1". Most of the posts I've seen say to use the "Move after:=x1.Sheets.Count" method...
  9. J

    Problem Creating Excel Chart TextBoxes in Access 2010

    Greetings, I made up an Excel VBA module to automatically create fairly complex charts with several textboxes. I've since learned that I can invoke Excel inside Access and create the charts. This is going VERY well, and the charts look great. However, when I want to start adding some...
  10. J

    Transfer Tables Directly to Backend Database

    I'm replacing the data everyday. We have Oracle tables for our statewide groundwater data in Sacramento, California (about 200 miles away). The dataset is rather huge with about 35,000 monitoring locations and about 1.5 million water level measurements going back to the early 1900's. The data...
  11. J

    Transfer Tables Directly to Backend Database

    Greetings, I've searched through the forums and haven't seen a definite "NO" to what I want to do. I'd like to to import some large oracle tables from a remote server using "DoCmd.TransferDatabase..." on a daily basis. Currently, the system works, but my database is getting quite large (800...
  12. J

    Use "FindNext" in KML Text File

    Thanks Pat. I'll work on it tonight and post back if I'm successful.
  13. J

    Use "FindNext" in KML Text File

    KML stands for "Keyhole Markup Language". It's very similar to HTML. So, I assume whatever procedures are used in HTML for "finding next" occurence of a string would work. I'm fairly proficient at Access VBA, but haven't done a whole bunch or raw file manipulation.
  14. J

    Use "FindNext" in KML Text File

    Greetings, I'm trying to write a KML text file using snippets from another KML text file. Previously, I would import a KML file into Access and use the FindFirst method to find a psrticular piece of code then use a Do Loop for getting the next few lines. However, I'm now working with files...
  15. J

    FindFirst Does Not Work with Decimal Data Type

    I'm linking to a bunch of tables that consultants designed for us for a web application. I have no idea why the consultants used "decimal" data type for EVERY numeric field in their tables. It seems very odd. I thought that maybe they needed decimal types for the web aspect of the project...
  16. J

    FindFirst Does Not Work with Decimal Data Type

    Using the CLng function did the trick! Thanks very much for your help! Much appreciated! Jon Mulder, Geologist Red Bluff, CA USA
  17. J

    FindFirst Does Not Work with Decimal Data Type

    I've got a bunch of tables that I'm linking to that have Primary fields as a Decimal Data Type. Actually, ALL of the number fields are of Decimal Data Type. I want to do a "FindFirst" to locate the first (and only) record that has, for example, "MASTER_SITE_ID = 49033". Prior to the FindFirst, I...
  18. J

    Determine if WhereCondition is Used when Opening Report

    That's just what I needed! Thanks very much, John!
  19. J

    Determine if WhereCondition is Used when Opening Report

    Is there a way to determine if the "WhereCondition" has a value when opening a report? I'd like to add a string variable to the header of my report (saying what the limiting criteria is) if the "WhereCondition" was invoked when running the DoCmd.OpenReport. Is the "WhereCondition" a...
  20. J

    Import KML File Into Google Earth

    Greetings, Earlier this year, I imported a Google Earth KML file into Access for California's 515 groundwater basins. The basins are polygons and the KML line defining the polygon sometimes gets as large as 25,000 characters. I was successful in importing the KML file by telling the wizard to...
Back
Top Bottom