Search results

  1. J

    Unzip and renamed compressed csv

    Hi all, I would like some code that extracts a file from a zip folder, renames and saves to a specified location. I've tried the code posted by Darth Vodka http://www.access-programmers.co.uk/...d.php?t=144356 but it gets stuck at the point of checking for the existence of Winzip. Any fresh...
  2. J

    Convert CSV file to XLS

    Hi all, I am after some code that will convert a csv file to an XLS file. I have made a start with the help of some older posts on this forum and elsewhere. Currently I have this: Sub test2() strDBPathAndFile = CurrentProject.Path Dim XLApp As Object Set XLApp =...
  3. J

    Access VBA & Excel spreadsheets

    Hi all, I am trying to learn how to read from and write to specific cells in an Excel spreadsheet, from a VBA module in Access. This is my first try at this and I am currently playing around with some code and ideas. All it does so far is run a sub to tell me what's in a particular cell in...
  4. J

    export to csv, without double quotes

    Hi all, I have this line of code: DoCmd.TransferText acExportDelim, , "tblLetterContent", strDBPathAndFile & "\Exports\LETTERS.csv", True This works fine. However, I wanted to export to the csv file without double quotes around each element. So, I exported manually and created the export...
  5. J

    Reading Filenames to an array

    Hi all, I'm looking for a way to read the names of PDF files in a specified folder, and storing them in an array. There is a similar post in this forum already... but the answer doesn't quite give me what I'm after. Is there a straight-forward way of doing this? Any advice, greatly appreciated...
  6. J

    Exporting a query to a csv file

    Hello all, I am trying to write some code to export query results to a csv file. I've read a few threads in this forum on the subject but none quite solve my problem. I have this line of code: DoCmd.TransferText acExportDelim, "1spec", "qry_SBI_NAME_ADDRESS", strDBPathAndFile &...
  7. J

    Creating Tables in VB

    Hi All, I have some code in a sub: On Error Resume Next DoCmd.RunSQL "DROP TABLE tblParcels" 'This deletes the table if it already exists. Dim tblParcels As TableDef 'Create the table Set tblParcels = db.CreateTableDef("tblParcels") 'Define the table Dim fldURN As...
  8. J

    Adding Autonumber with MakeTable query

    Hello all, I have a MakeTable query, which effectively just filters data from an existing table, but I want to add an autonumber field column to it. Looking around the internet it seems this isn't as straight forward as I'd hoped! Seems like it should be simple, as I'm sure it's a common thing...
  9. J

    Writing to a table

    Hello, I'm writing some VBA in Access, part of which is to write to a table. I'm using this: Set db = CurrentDb Set rst = db.OpenRecordset("tblParcels") rst.AddNew rst!ID = 1 rst!URN = "TEST" rst.Update this = rst!URN MsgBox this However, when I run the code and then look at the table no...
Back
Top Bottom