MS Acsess: Query in a form

Discussion in 'Databases' started by Gazz1982, Nov 16, 2007.

  1. #1
    I have an access form set up with a few subforms, I am trying to calculate the sum of one of the columns in a subform where the ID is the one currently displayed in the containing form.

    So I need some kind of sql but im stuck on the where section i.e

    SELECT sum(size_kb)
    FROM file_types
    WHERE ID = "the current record";

    the database consists of 2 tables with ID as the primary key, this has a 1 to many relationship from articles to file_types, respectively

    any ideas?

    Thanks

    Gary
     
    Gazz1982, Nov 16, 2007 IP
  2. WL_Marketing

    WL_Marketing Banned

    Messages:
    216
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #2
    What does your database schema look like? You said you have 2 tables, but your SQL query only uses one table file_type.
     
    WL_Marketing, Nov 19, 2007 IP