recordset

  1. 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.
  2. 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...
  3. 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...
  4. 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...
  5. 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...
  6. 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...
  7. 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...
  8. 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)...
  9. 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...
  10. 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...
  11. 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...
  12. 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...
  13. M

    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...
  14. 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...
  15. 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...
  16. 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...
  17. A

    How to Update SQL Sever Recordset from VBA Excel - It does not work, but errors are Not given

    Excel Friends, I have been trying to develop a recordset update VBA code for a customer SQL server database. I could develop a "rs.addNew" record easily. However, I do not know SQL/VBA enough to make the update code below work for me. This Sub is called after another sub that actually makes it...
  18. B

    Facing issues while importing data from MS Access to MS Excel

    Hi, I am trying to edit the code from below mentioned website to suite my requirements. However, before I could finish editing, I could see few of the code lines are reflecting in red. I have mentioned 'Code is reflecting in red line below' just above the problematic code. Can anyone please...
  19. A

    Comapre Row against ADODb Recordset

    I'm connecting to Access and opening a recordset for data which should match my Worksheet. Is there a way to check each Excel row against the recordset, without looping through every column? (They're in the same order on both).
  20. B

    Debugging Recordset by printing to immediate window

    Does anyone have on hand a iterative method to print a recordset to the immediate window. Preferably all columns and rows in a table manner with the field names at the top.

Some videos you may like

This Week's Hot Topics

  • VBA (Userform)
    Hi All, I just would like to know why my code isn't working. Here is my VBA code: [CODE=vba]Private Sub OKButton_Click() Dim i As Integer...
  • List box that changes fill color
    Hello, I have gone through so many pages trying to figure this out. I have a 2020 calendar that depending on the day needs to have a certain...
  • Remove duplicates and retain one. Cross-linked cases
    Hi all I ran out of google keywords to use and still couldn't find a reference how to achieve the results of a single count. It would be great if...
  • VBA Copy and Paste With Duplicates
    Hello All, I'm in need of some input. My VBA skills are sub-par at best. I've assembled this code from basic research and it works but is...
  • Macro
    is it possible for a macro to run if the active cell value is different to the value above it
  • IF DATE and TIME
    I currently use this to check if date has passed but i also need to set a time on it too. Is it possible? [CODE=vba]=IF(B:B>TODAY(),"Not...
Top