Recent content by captdkl02

  1. C

    DLookup Syntax error

    I am receiving this error in regards to DLookup: Syntax error (missing operator) in query expression 'Course Number = 'FMF 1002" This is line of code where error is happening: CompetencyType = Nz(DLookup("Competency", TableContainUpdates, "[Course Number] = '" & rs.Fields(FieldtoPair) &...
  2. C

    Query to find all field header names contain string

    Requirement Clarification: Looking for MS Access Query to return values: 1) return all records that have Column header names that contain "PL-" and have a field (column) value with a number. I attached an excel file that shows the table column headers and one row with typical data as...
  3. C

    Query to find all field header names contain string

    I appreciate what you sent me. Here is something I found online that find field names of DB table and writes to temp db table. It might be helpful to other folks. Sub GetField2Description() '********************************************************** 'Purpose: 1) Deletes and recreates a...
  4. C

    Query to find all field header names contain string

    I need a query to find all the field header names that contain string "PL-" and along with records contain a value with the field name containing "PL-" within a Access DB table. thank you.
  5. C

    VBA Excel 2010 Hide Non Adjacent Columns not working

    Rx, I took your code ran to see what is was doing. Then I relooked at my code ran it through the debugger with Excel visible = true to observe the Excel Workbook being formatted by my code. I saw that hidden columns was working and another formatting in my code made the columns visible...
  6. C

    VBA Excel 2010 Hide Non Adjacent Columns not working

    Rx, I used your code fragement in my function and did not hide the columns while running VB script with Access. However, I took this code and ran as macro within the Excel sheet while excel was open and it worked. Range("BJ:BJ,BL:BL,BM:BM,BO:BO,BP:BP,BX:BX,BY:BY,CE:CE").Select...
  7. C

    VBA Excel 2010 Hide Non Adjacent Columns not working

    I put tags around the code. Also, I tried a simplistic code that did not hide columns. I tried these code fragments and did not work either. Apxl.Union(xlWSh.Range( _...
  8. C

    VBA Excel 2010 Hide Non Adjacent Columns not working

    I am formatting access data to excel worksheet and the portion of my code runs, but it is not hiding excel columns that I specify. I am including the function below and highlighted code hiding the excel columns portion that does not hide the columns. I took the code generated by Excel when...
  9. C

    Update Access table from Excel Workbook cells

    Access database table was created from importing 6 Excel Workbooks with multiple tabs via a Visual Basic Script. All 6 Excel workbooks all had identical field structure. I wrote a VBA script to create the Access table. The initial ACCESS table contained 502 records and 38 columns (fields). The...
  10. C

    Run-time error 1004 - Save method of workbook failed

    I found from another forum the solution to save excel workbook and close excel application. xlWBk.Close savechanges:=True
  11. C

    Run-time error 1004 - Save method of workbook failed

    I modified a Function SendTQ2XLWbSheet (access query results to existing excel workbook) in attempting to save Excel workbook and exiting out of Excel after the "CopyFromRecordset" was done. I made these changes when observing each time I called the function I saw it was not saving the file with...
  12. C

    Question run time error 3011 when exporting access report to excel

    It is passing the name of the report that I was expecting. I changed the code slightly using DoCmd.OutputTo acOutputReport. It is writing the file to the directory, however; I am receiving another errror. Error message => "Excel cannot open the file 'test.xlsx' because the file format or...
  13. C

    Question run time error 3011 when exporting access report to excel

    Hello, I using excel 2010 and access 2010. I have VBA script runtime error 3011 when running script. It has problem finding access report. First I was passing in as variable with the name. Then I used a script to pull in the report name from access and it is still failing with same error...
  14. C

    Import Excel workbook into Access table using Excel's format (formulas, values, etc)

    All, Is there a way to import an Excel workbook into Access keeping the various worksheets formatting such as Excel sheet's formulas, value, formats, comments, etc.? From google search so far, I can not find such a capability. I am able to import only the data from Excel workbooks into Access...
  15. C

    Question Export access table to multiple excel workbooks with multiple tabs

    Any help is appreciated to solve runtime error 3061. See info below. I had the code working for reading one workbook with multiple tabs(sheets). I several workbooks so I added a second loop and now I stuck on with a runtime error 3061 (too few parameters. Expected 1) . It is bombing on prior...
Top Bottom