recordset

  1. G

    VBA connect to Ms Access using ADODB.Recordset with non-alphanumeric table name

    I am trying to connect to Microsoft Access using ADODB.Recordset in VBA, but apparently it seems to only accept alphanumeric table name. Changing table name manually in Access is just additional work (and I need to teach it) for the macro user, so it would be great if it can work without doing...
  2. N

    VBA having column name and value down the left of the worksheet

    Rather than have all my column names across the top of the worksheet, I'm looking to have them down the left hand side eg in Column A. The value of that will then be in Column B. I have used a recordset which loops through and pulls the first column correctly, but I need 30 more columns to do...
  3. R

    please help me modify my vba code

    Dear All master, I want to connect with multi data source for dbf file with vba array code. what I want is the following: 1. Modify the connection string according to the dbase file provider 2. Can I connect with my multi DSN reference and become one sheet Data Source Name DefaultDir FILE NAME...
  4. J

    VBA mysql SELECT MD5(tel)

    Hello, I've got problem. I receive phone number hashed by MD5 (00037b319ddf1495b2e7ae64e29a8ef5). I need to get this number from our mysql database. So mysql query is: SELECT MD5(c.mob) phone, c.mob phone1 FROM db_hu.hu_cust c WHERE MD5(c.mob) IN ('00f9758dd73300b4025ea916c8a3e024'); I...
  5. B

    How to acces ADO disconnected recordset object from another workbook

    Is it possible to have a recordset object created in one workbook but access this recordset object from another workbook's vba code? I was thinking maybe getobject could be used to capture it from another workbook but I cannot find any resources on this.
  6. B

    Concatenate Records from Record Set (rs) SQL Query from ACCESS Database

    Hi Cummunity, Needing some help to concatenate row values being retrieved from ACCESS Database. INstead of writing to multiple rows, i need to concatenate all the record set values and write it to a single cell. Here is a view of part of my code: Currently there are two rows in the database...
  7. M

    Open Access query via VBA and lock

    I have used the following previously to open a query in Access and then copy the data to a holding sheetrsQuery.Open strQuery, cnConnection, adOpenKeyset, adLockOptimistic I now need to use the same but stop anyone else from getting any of the records that are in the recordset so effectively...
  8. baitmaster

    extract single record from recordset

    I want to create a recordset that contains only a single result from a larger recordset, how can I do this? I have a recursive algorithm that calls itself many times, passing a single record in, and getting a new set of results where one entry will be used in the next step and then passed on...
  9. K

    Use a cell value to query an external Access DB

    I use this forum all the time and it is awesome but couldn't find an answer this time. I got the below vba macro to work but want to use a cell value as the search value instead of typing it directly in the macro. I tried several different things but always returned an error I changed the...
  10. J

    How to pass a parameter into a query to sort by a particular order

    Trying to pass a parameter into a query to sort a recordset. I was keeping a recordset in memory to sort it but the rowsource will not take a recordset directly. So I figured I could use a parameter to pass into the query and sort it that way. The code works if I hard code the sort criteria but...
  11. J

    How to get a listbox to display the first row

    I'm binding a runtime query to a listbox. I hit the cancel button and the listbox displays the last several rows in the recordset rather than display the first row. ListIndex and the properties I use in Excel cannot be assigned values in Access. How can I get the listbox to display the first...
  12. O

    quering access report from excel vba

    Hi guys, can someone help i am trying to do vba/access link for the first time, and its quite hard! I am trying to access a report in access (which has a password) called R_UCITS-AIFM_Summary via an excel VBA, my first issue is normally input two dates, start and end date (normally the same)...
  13. R

    VBA: Combobox ID Value as Query Parameter not longer working

    Hi experts, I have a VBA code that opens a recordset: Private Sub Form_Load() Dim qdfFillDictionaryOptional As DAO.QueryDef Dim rsFillDictionaryOptional As DAO.Recordset Set qdfFillDictionaryOptional = CurrentDb.QueryDefs("qryFillDictionaryOptional") Set...
  14. S

    Searching using ADODB

    I am trying to find data from access using the below code. The variable R is the date which it will search in the table. If date find in table, it will pickup data from some of the field else it will close the connection and loop will forward. Now the statement "On Error GoTo ST2" is working for...
  15. C

    Creating a recordset via VBA SQL and selecting the vales of a value list column

    Hey all! I have created an Access 2016 database with a table that has a column set as a value list. This allows me to create a checkbox-style input for the user, but I am having difficulty retrieving the values using SQL in VBA to create a recordset. I want to pull the record that corresponds...
  16. P

    Copy sum from database recordset

    Hello forum, I have some code below that I've found that pastes an entire recordset (which is a query) from a database and pastes it in cell A2. Is there a way for me to be able to paste just the sum of a single field from the record set in cell A2? Sheets("Existing Access...
  17. Manuel Cavero

    Populating a RecodSet from an Array

    Good morning/afternoon everyone: I'm trying to update a table in a Excel's workbook using ADO. Few things before the code: I have to say that I checked the property RecordSet.Status for the AddNew method and the boolean given it is true. I'm using a Microsoft.ACE.OLEDB.12.0 driver. The data...
  18. E

    Insert Excel Sheet Data into Teradata database USING ADO IN VBA

    I have vb code using ADO that can insert a single row of data from an Excel sheet one at a time. But I am looking to insert the entire contents on the sheet1 all at once. Here is my single row code. Sub SampleInsertLoopingThroughRows() Dim conn As ADODB.Connection Set conn = New ADODB.Connection...
  19. skorpionkz

    [VBA] Loop Recordset vs Array - What is faster

    Hi guys, I have code to read data from about 50 data tables. Code opens connection, creates recordset and then pass it to the array. Next it close connection and then loop through the array. I am wandering now is this would be actually better/faster to loop through the Recordset itself? Or...
  20. Z

    ADODB Recordset timing out but not giving an error

    Hi, I have a macro that connects to a DB2 database and returns a recordset that I complete subsequent actions with. I have found that longer queries are causing excel to stall - giving me the 'this program is not responding' and forcing me to restart excel. I have played around with the command...

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top