Search Result

Collapse
26 results in 0.0015 seconds.
Keywords
Members
Tags
recordset
  •  

  • Problems in getting a string value from a recordset

    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.
    ...
    See more | Go to post

  • Digital Oatmeal
    started a topic Calling an adodb recordset in a text box

    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
    ...
    See more | Go to post

  • Yannt
    started a topic Inefficient Loop

    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
    ...
    See more | Go to post
    Last edited by Rabbit; Feb 20 '12, 05:26 AM. Reason: Fixed code tags

  • Sandra Walsh
    started a topic Using a Recordset in DLookup

    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()
    ...
    See more | Go to post
    Last edited by NeoPa; Jan 30 '12, 11:11 PM. Reason: Added extra CODE tags

  • How 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...
    See more | Go to post

  • How 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

    Code:
    If rs31![POID] = rs32![POID] And rs31![MRP Date] < rs32![Pstg Date] Then
    rs31.Edit
    rs31![QTY ACC] = rs32![QTY ACC]
    rs31.Update
    In other words I need rs31 to be equal rs32 + current value in rs31.

    Any help on that pls?
    See more | Go to post
    Last edited by NeoPa; May 10 '11, 11:22 AM. Reason: Added CODE tags for you. Please remember for next time.

  • How 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...
    See more | Go to post

  • 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
    ...
    See more | Go to post
    Last edited by Stewart Ross; Mar 11 '11, 12:17 AM. Reason: Code tags added

  • 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...
    See more | Go to post

  • Steve Sothern
    started a topic How to store recordset names in array?

    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 & _
    ...
    See more | Go to post

  • 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....
    See more | Go to post

  • 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),...
    See more | Go to post

  • 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...
    See more | Go to post

  • Is 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!!
    See more | Go to post

  • Qtip23
    started a topic Workaround to decrementing Autonumber field

    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...
    See more | Go to post
Working...