recordset

Access 2016 VBA unable to set button click on form to write multi-value fields to second table

孤街醉人 提交于 2020-01-16 17:05:31
问题 I am building an application to track time amongst project, employees, etc. The company I work for has significant security red tape, so I have to use MS Access 2016, I am barred from youtube to search solutions, and I cannot download any files from the internet. Luckily, I can still access StackOverflow. I have an entry form ("Task_List_Entry_Form") that has a button. On click, the button sends values to a table ("tbl_Task_List"). In the form VBA I've included that the table ("tbl_Task_List"

Access 2016 VBA unable to set button click on form to write multi-value fields to second table

一笑奈何 提交于 2020-01-16 17:03:17
问题 I am building an application to track time amongst project, employees, etc. The company I work for has significant security red tape, so I have to use MS Access 2016, I am barred from youtube to search solutions, and I cannot download any files from the internet. Luckily, I can still access StackOverflow. I have an entry form ("Task_List_Entry_Form") that has a button. On click, the button sends values to a table ("tbl_Task_List"). In the form VBA I've included that the table ("tbl_Task_List"

How to select distinct values from one column in adodb recordset Excel VBA?

柔情痞子 提交于 2020-01-16 06:58:50
问题 I have a ADODB.Recordset rs that I'm getting from DB. I have to reuse this recordset twice now. This is sample of my Recordset: Mike Client John Manager Karen Client Joe Sub Brian Manager Now I need to get all the titles, so I want to get: Client Manager Sub I know that there is rs.Filter , but I'm not sure if I can select distinct from it. Also I know that I can clone this Recordset: Dim rs_clone As ADODB.Recordset Set rs_clone = New ADODB.Recordset rs_clone = rs.getrows() Is it possible to

How to select distinct values from one column in adodb recordset Excel VBA?

天涯浪子 提交于 2020-01-16 06:58:42
问题 I have a ADODB.Recordset rs that I'm getting from DB. I have to reuse this recordset twice now. This is sample of my Recordset: Mike Client John Manager Karen Client Joe Sub Brian Manager Now I need to get all the titles, so I want to get: Client Manager Sub I know that there is rs.Filter , but I'm not sure if I can select distinct from it. Also I know that I can clone this Recordset: Dim rs_clone As ADODB.Recordset Set rs_clone = New ADODB.Recordset rs_clone = rs.getrows() Is it possible to

Classic ASP disconnected recordsets issue

社会主义新天地 提交于 2020-01-16 04:39:09
问题 So, I've been asked to update an old Classic ASP website. It did not use parameterized queries and there was very little input validation. To simplify things I wrote a helper function that opens a connection to the database, sets up a command object with any parameters, and creates a disconnected recordset [I think!?! :)] Here's the code: Function GetDiscRS(DatabaseName, SqlCommandText, ParameterArray) 'Declare our variables Dim discConn Dim discCmd Dim discRs 'Build connection string Dim

Update recordset without updating database

◇◆丶佛笑我妖孽 提交于 2020-01-15 03:24:31
问题 I use an ADODB connection to connect to my Access DB in Excel VBA and get the records with a recordset. I want to update the recordset, but when i update the recordset i also update the table in the DB. Is it possible to update the recordset but not the db? Here is my code, Dim con As New ADODB.Connection Dim rs As New ADODB.Recordset con.Open "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Users\jasons\Documents\UPD.accdb" rs.Open "SELECT ITEM, SL AS SL FROM Table2", con, adOpenDynamic,

VBA/Access RecordSet per form record problem

余生长醉 提交于 2020-01-06 16:54:56
问题 I'm new to VBA and Access in general and ran into this problem whilst trying to use the proposed alternate implementation from another question I'd asked (DLookup in Access not running until textBox clicked on in Form) The code below runs, the issue is that Me.Key is different for each record being displayed in the form and running this in the form open event means it grabs only the first value assigned to Me.Key from the first record. How can i make this run so that Me.Key is different for

ASP recordset fileds are empty at second utilisation

一个人想着一个人 提交于 2020-01-06 03:52:11
问题 Does anyone know why this statement Response.write(rs.Fields.Item("password")&" ; "&rs.Fields.Item("password")) Do this : myPass ; It's very strange and I'm looking for a solution since this morning. It's making me crazy because the result of this is that this codntion : if rs("password") = rs("password") then is False ! EDIT : After other test, i have made an other discover : Response.write(rs.Fields.Item("name")&" ; "&rs.Fields.Item("name")) do : amdin ; admin And if i change "password" by

Access:How can I generate a report of a recordset?

你。 提交于 2020-01-05 08:42:50
问题 How can I generate a report in access with the data from a recordset (instead of a query or table). I have updates to the recordset that also must be shown in the report. 回答1: From Access Web you can use the "name" property of a recordset. You resulting code would look something like this: In the report Private Sub Report_Open(Cancel As Integer) Me.RecordSource = gMyRecordSet.Name End Sub In the calling object (module, form, etc.) Public gMyRecordSet As Recordset '... Public Sub callMyReport(

Edit records in ADODB recordset

我只是一个虾纸丫 提交于 2020-01-05 07:51:13
问题 What I am trying to do is to get some data from an online server through an SQL Query and then loop through the recordset modifying the records. I get an error when trying to modify the recordset: "Multiple-Step operation generated errors. Check each status value." My question is: Is there a way of modifying a record from a recordset that I got from a Query? In this case I am modifying field 2 if field 1 meets a certain criteria. (In this case Field 2 is a string) Here is the simplified code: