Search results

  1. B

    Using Excel VBA code through a SQL Server 2008 Database

    Hi All I have a table in SQL Server, call it table1, residing in a database, db1. I have excel VBA code that was originally designed to run through a table in Access. The code performs a bunch of calculations, produces a few records based on the data in the table and the calculations, and puts...
  2. B

    GROUP query run from excel VBA

    Hi I should add that it may be easier to call a stored procedure. So I can save the query in access, and then simply get excel to run it after 50000 records, and so on through the loop. Thanks!!
  3. B

    GROUP query run from excel VBA

    Hi I have written VBA code in excel that takes an existing access table (1), does calculations and pastes the 'answers' in a different table (2). Through this process, for each record in the first table, about 20 are created in the second. Access cant handle all the records in table2, so...
  4. B

    runtime error 424 with DoCmd

    Hi all I want to transfer all the records from an access table into a text/csv file. Im using the following code, but get error 424: object required: DoCmd.TransferText acExportDelim, "Exposure Export Specification", "TEMP_KN_DATA", "C:\Exposure Tool 2009\Exposure.csv" Any ideas? In...
  5. B

    Exporting table to .txt file

    yes I think SQL server may be the way to go. Not sure whether it is possible at work here, but definitely something I should look into...
  6. B

    Exporting table to .txt file

    Thats so irritating. Itype out a massive reply and click "submit" and it tells me I must first log in. Fuck. Well, here goes again (this time Ill save the message before i send just in case!). It is difficult to explain precisely whats going on here since a lot of the stuff is specialist...
  7. B

    Exporting table to .txt file

    Oh and forgot to mention, there are about 40 fields in the table (policy code, policy type, age, gender etc etc)
  8. B

    Exporting table to .txt file

    David Im working in insurance. The 'thing' im creating is an EXPOSURE TOOL, which basically (!!) calculates the amount of time that lives in certain categories (such as age, gender, smoker status, year etc etc etc) are exposed to risk. This is then used to determine mortality rates. This is...
  9. B

    Exporting table to .txt file

    Hi David 2 of the fields in the DATA table are "DATE FROM" and "DATE TO". The TEMP table, apart from some (complicated) calculations, contains DURATION (which for this purpose simply means number of full months elapsed since DATE FROM) as one of its fields. That means for a record in DATA...
  10. B

    Exporting table to .txt file

    I have a table (DATA) from which I am creating another table (TEMP). TEMP contains all of the fields of DATA, with the addition of several calculated fields as well as considerably more rows (1 row of DATA yields about 25 rows in TEMP). This has meant I cannot create the entire TEMP table at...
  11. B

    group by query in vba

    Hi guys. Does anyone know how to run a make table/group by query from vba? What I want to do it run a loop through, say, 100000 records. This creates a new table with some added calculated fields. After these 100 000 records, I want the code to make a table with grouping for a selection of...
  12. B

    VBA code to populate an access database

    oh and I know I'm asking a lot, but one more question: I'm writing all this code in Excel VBA. I want to delete all the records from a table so that when I paste records in it, only new records go into the table. I tried: Private Sub DeleteAll_Click() Dim StrSQL As String StrSQL = "Delete *...
  13. B

    VBA code to populate an access database

    sounds cool, but i have no idea how one would achieve such a thing...
  14. B

    VBA code to populate an access database

    The database I want to do queries on is huge, so I'd ideally like to run these queries from VBA rather than opening the db itself. Thanks
  15. B

    VBA code to populate an access database

    Thanks so much dude. It worked when I put the TempTable.Update before the End With. Im now trying to figure out how to do a group by query in vba so that I can reduce the number of records (as for many, the cell values are the same except for a calculated field which I want summed across all...
  16. B

    VBA code to populate an access database

    Thanks for the speedy reply. Where do I put the TempTable.Update in my code? Are you saying that the "With" is unnecessary?
  17. B

    VBA code to populate an access database

    Hi all. Hopefully someone will have the answer I am looking for :) I have an existing databade (db1) and table (t1). I want to perform calculations for each record and then create a new database and table (db2 and t2) to dump the data in. t2 will have all the same fields as the first table...
Back
Top Bottom