Results 1 to 3 of 3
  1. #1
    Join Date
    May 2003
    Costa Rica

    Unhappy Unanswered: Really easy Transfer data between tables

    Table Información has been counted the records. I assign the recordcounting in a value strCUENTI of the table Información. Now I want to transfer that value to the table called Inicio at the field INICIO. Can someone help me please

    Dim dbNONA As DAO.Database
    Dim strCUENTI
    Dim rsNONA As Recordset
    Set dbNONA = CurrentDb()
    Set rsNONA = dbNONA.OpenRecordset("Información")
    Debug.Print " RecordCount = "; rsNONA.RecordCount
    strCUENTI = rsNONA.RecordCount
    MsgBox strCUENTI
    Dim strfoco
    Dim rsfoco As Recordset
    Set dbfoco = CurrentDb()
    Set rsfoco = dbfoco.OpenRecordset("Inicio")
    rsfoco("INICIO") = strCUENTI **********NOT ACCEPTED**********************

    End Function

  2. #2
    Join Date
    Jan 2003
    Rockville, MD
    Is INICIO a field in table Inicio?
    If it is, what is the field type?

  3. #3
    Join Date
    Jul 2003

    Re: Really easy Transfer data between tables

    Are you getting anything returned into the recordcount. Not sure about DAO but ADO you should rst.movelast then rst.recordcount. You could always do a "SELECT Count(Table.Field) AS CountOfField FROM Table;" which will return the number of records and not need the processing time or memory resources to open the whole table into a rst.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts