Results 1 to 3 of 3

Thread: calculate

  1. #1
    Join Date
    Sep 2003
    Location
    netherlands
    Posts
    25

    Unanswered: calculate

    hi
    i want to calculate how many dvd,cd or vhs there are in my database
    but don't know how to do this
    can somebody help me with this
    example in the database are 10 movie's
    5 on dvd
    2 on cd
    3 on vhs
    i want to see in a form how many of all there are in the database

    thanx

  2. #2
    Join Date
    Nov 2003
    Posts
    1,487
    Code:
    Dim DVDs As Long, CDs As Long, VHSs As Long
    
    DVDs = DCount("[myRecordDVDidendifier]", "myMovieTableName", "[myTableRecordMovieName] <> NULL")
    
    CDs = DCount("[myRecordCDidendifier]", "myMovieTableName", "[myTableRecordMovieName] <> NULL")
    
    VHSs = DCount("[myRecordVHSidendifier]", "myMovieTableName", "[myTableRecordMovieName] <> NULL")
    
    MsgBox"There are " & CStr(DVDs) & " DVD's,  " & CStr(CDs) & " CD's, and " & CStr(VHSs) & _
    " VHS titles located within my database table."
    Hope this helps

  3. #3
    Join Date
    Sep 2003
    Location
    netherlands
    Posts
    25

    Thumbs up

    Thanx For Your Help

Posting Permissions

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