I am using a recordset to retrieve values from a sql server database that I would want to display on an classic ASP page. It however seems that I cannot get a string value from the recordset. It just shows a blank space on the page that I want that value to appear. I have marked as bold the value that is supposed to have a string value in the code below. Please help me out and let me know what I could be missing. I am working with VBScript.
...
Search Result
Collapse
26 results in 0.0015 seconds.
Keywords
Members
Tags
-
Problems in getting a string value from a recordset
-
Calling an adodb recordset in a text box
I am trying to call a function from a text box on a subform that returns a summed total of a single calculated field. I need to reproduce this function in multiple subforms so it is encapsulated as possible. Here's the code:
...Code:Function Receipts(ByVal CHEMICAL As String) As ADODB.Recordset Dim sql As String Dim beginningDate As Date Dim endingDate As Date Dim chemicalID As String -
Inefficient Loop
Hi,
I'm trying to simplify and make this piece of code more efficient (basically would like to remove the 2nd loop); any suggestions?
Thanks
Yann
...Code:Dim db As Database, rst1 As Recordset, rst2 As Recordset, qry1 As String, qry2 As String Dim intCurrentProgress As Integer, intTotalWidth As Integer, intProgressBarMax As Integer q = MsgBox("Are you sure you want -
Using a Recordset in DLookup
Hello -
I have an Access 2007 database that has an ODBC connection to several very large, non-updateable tables in our CRM system.
I would like to speed up my app by using a recordset as the source for some DLookup fields in my forms.
I found and have adapted the following code that runs when I load my Dashboard, the first form that loads whent the app is opened.
...Code:Private Sub Form_Load()
-
Lori Brynlund started a topic How to consolidate multiple records from a subform onto 1 line in a reportin AccessHow to consolidate multiple records from a subform onto 1 line in a report
Hi,
I have a form A that contains a subform B listing the names of potentially multiple people all associated with the 1 record displayed on form A. That part works just fine.
Now, I want to be able to create ONE line (NOT just a subreport listing all the names from the subform) in my associated report that basically loops through all the records, pulls out all the names associated with that one record, and lists... -
Edu Castro started a topic How can I add up a value to the current recordset value when editing a table?in AccessHow can I add up a value to the current recordset value when editing a table?
here is my code I can edit the current rs value, but this code is replacing the existing one. Instead I need the code to add a new value to the existing one
In other words I need rs31 to be equal rs32 + current value in rs31.Code:If rs31![POID] = rs32![POID] And rs31![MRP Date] < rs32![Pstg Date] Then rs31.Edit rs31![QTY ACC] = rs32![QTY ACC] rs31.Update
Any help on that pls?Last edited by NeoPa; May 10 '11, 11:22 AM. Reason: Added CODE tags for you. Please remember for next time. -
Knut Ole started a topic How to organize my Record Sources & Control Sources in subform data entriesin AccessHow to organize my Record Sources & Control Sources in subform data entries
Hi,
I have a mainform for a new camping reservation, with a subform for entering a new contact upon making a new reservation. I also have a subform for editing a contact on-the-run when making a new reservation.
I've become a bit confused, however, as to whether I'm organizing it correctly, and I plain wonder how to update the respective fields after entry.
I have the following (relevant) tables:
BOOKINGS... -
How to use excel VBA to SQL query and compare data?
I have the below code, which queries a database and compares the recordset against my variable 'StockCode'.
This is not currently working and if i add the line 'Msgbox rs.recordcount' then this comes back with the message '-1'.
However, when i add the line 'ActiveSheet.Ra nge("A5").CopyF romRecordset (rs)' then all records are pasted in to my excel spreadsheet. can someone see what i am doing wrong?
...Code:Sub
-
Recordset Update from one table to another using main form/Subform
I am trying to update the main form with each record in the subform.
I have two tables Invoice and Payment table.
The main form has the payment details which I need to update for each invoice selectedon the subform.
EG
Invoice Table (SubForm)
Ref no , Inv No , Amt
1 , 101 , 10.00
2 , 102 , 20.00 etc
Payment Table Feilds... -
How to store recordset names in array?
what is wrong with this code?
...Code:Dim initials As String, e_SIG As String, queryFUP As String Dim rstFUP(4) As Recordset Set rstMSG = CurrentDb.OpenRecordset("defaultemailmsg") initials = "AM" e_SIG = vbCrLf & _ vbCrLf & _ vbCrLf & _ vbCrLf & _ "Kind regards," & vbCrLf & _ -
How to Use recordset to copy data as a batch from table to table?
I use the following code to copy data from one table (Fis_CaptureT) to another table (Fis_CaptDataT) in real time.
It works 100%, except when you make a typo, because that also gets copied then to the 2nd table.
I would like to do a batch transfer with a button called "PostData" of all the fields listed here on completion of an order, instead of in real time, to allow checking before copying of the order to the 2nd table.... -
How do I move to the previous field in a recordset?
I am pretty inexperienced with VBA recordsets, and hope there is a simple fix to my problem. I have a recordset (rstQuestions) and am using a For Each...Next operation to go through the fields (fldQuestions) and pull data from relevant ones. I'm running into a problem though when I try to navigate to the previous field (not record).
Here's what I'm trying to do... I need to find the relevant field in a recordset (done; no problems),... -
How to delete a record from recordset but not from table
I am trying to load certain data from a table into a recordset and then working with it without affecting the data in the tables.
The idea is to post all records in a table (given a certain criteria) randomly one by one, and when one has been displayed, it needs to be deleted from the recordset (but not the table!) so it does not randomly show up again.
My problem thus being, if I use rst.delete it will not just delete... -
sakurako97 started a topic Is it possible to pass the current form's Recordset to DoCmd.TransferTextin AccessIs it possible to pass the current form's Recordset to DoCmd.TransferText
hi,
i am trying to find out if it is possible to pass the current recordset of a form to DoCmd.TransferT ext so i can export it as a .csv
I know I can use querydefs etc, but it would be a much nicer solution if i could just loop through my subform1 and get the nested subform2 recordsets and pass them to the routine.
has anyone had experience with this ?
any ideas would be overwhelmingly appreciated!! -
Workaround to decrementing Autonumber field
Hello Everyone,
I have been searching for ways to prevent the autonumber field from increasing when a user decides he/she does not wish to enter a record.
I searched Bytes and I think I saw something that alluded to setting up two distinct tables (let's call them Table B and Table C). Table B is the one with one field and the field name is the same as the Autonumber field of the host table in question (let's call it...