• Number of rows?

    Author
    Topic
    #353659

    How can I determine the maximum number of rows in a table in Access 2000 using VBA?

    James

    Viewing 1 reply thread
    Author
    Replies
    • #517859

      I don’t think there is a “maximum number of rows”. You are limited by file size (2GB in Access 2000).

      If you mean “current number of rows”, I think you have to open a recordset based on the table, move to the end, and look at the recordcount property.

      Jeremy

    • #517928

      Are you looking for the number of records or the table limit? If the former, you can use this:

      Public Function TableRecords(ByVal strTblName As String)
        Dim dbs As DAO.Database
        Dim tdf As DAO.TableDef
        
        Set dbs = CurrentDb
        Set tdf = dbs.tabledefs(strTblName)
        TableRecords = tdf.RecordCount
        Set tdf = Nothing
        Set dbs = Nothing
      End Function
      • #517994

        I’m looking for the number of records.

        Thanks for the help!

        James

    Viewing 1 reply thread
    Reply To: Number of rows?

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: