total or sum function?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • DP

    #1

    total or sum function?

    hi,

    i've got a tabel called customer, which has usual customer details on it.
    i've got a home page form, which a text box in it.

    i want to display the total number of records in the customer table in it.
    any ideas? it should display '2'
    so far i've got;

    =Sum(tblCustome r!MembershipID)

    but its producing an error. its a simple problem, but i caint used access
    for ages, and cant remember how to do it.

    do i need to use teh exporession builder, or use vb for applications?

    thanx

    dev




  • Wayne Gillespie

    #2
    Re: total or sum function?

    On Sun, 22 Jan 2006 12:33:58 GMT, "DP" <DP@hotmail.com > wrote:
    [color=blue]
    >hi,
    >
    > i've got a tabel called customer, which has usual customer details on it.
    >i've got a home page form, which a text box in it.
    >
    > i want to display the total number of records in the customer table in it.
    >any ideas? it should display '2'
    >so far i've got;
    >
    >=Sum(tblCustom er!MembershipID )
    >
    >but its producing an error. its a simple problem, but i caint used access
    >for ages, and cant remember how to do it.
    >
    >do i need to use teh exporession builder, or use vb for applications?
    >
    >thanx
    >
    >dev
    >
    >
    >[/color]

    =DCount("Member shipID","tblCus tomer")

    Wayne Gillespie
    Gosford NSW Australia

    Comment

    • DP

      #3
      Re: total or sum function?

      hi

      that worked thanc.

      how would i look fro something more specific. e.g.
      i've got a field called 'city', how would i count teh number of people, say
      from london?

      i've got

      =DCount("City = 'London'","tblC ustomer")

      and its saying 2, but there is only one eprson from london.

      thanx

      devin

      "Wayne Gillespie" <bestfit@NOhotm ailSPAM.com.au> wrote in message
      news:n107t1da64 sub1b4udh5r57d8 hkfbtf6h7@4ax.c om...[color=blue]
      > On Sun, 22 Jan 2006 12:33:58 GMT, "DP" <DP@hotmail.com > wrote:
      >[color=green]
      > >hi,
      > >
      > > i've got a tabel called customer, which has usual customer details on[/color][/color]
      it.[color=blue][color=green]
      > >i've got a home page form, which a text box in it.
      > >
      > > i want to display the total number of records in the customer table in[/color][/color]
      it.[color=blue][color=green]
      > >any ideas? it should display '2'
      > >so far i've got;
      > >
      > >=Sum(tblCustom er!MembershipID )
      > >
      > >but its producing an error. its a simple problem, but i caint used access
      > >for ages, and cant remember how to do it.
      > >
      > >do i need to use teh exporession builder, or use vb for applications?
      > >
      > >thanx
      > >
      > >dev
      > >
      > >
      > >[/color]
      >
      > =DCount("Member shipID","tblCus tomer")
      >
      > Wayne Gillespie
      > Gosford NSW Australia[/color]


      Comment

      • Wayne Gillespie

        #4
        Re: total or sum function?

        On Sun, 22 Jan 2006 13:41:09 GMT, "DP" <DP@hotmail.com > wrote:
        [color=blue]
        >hi
        >
        > that worked thanc.
        >
        >how would i look fro something more specific. e.g.
        >i've got a field called 'city', how would i count teh number of people, say
        >from london?
        >
        >i've got
        >
        >=DCount("Cit y = 'London'","tblC ustomer")
        >
        >and its saying 2, but there is only one eprson from london.
        >
        >thanx
        >
        >devin
        >[/color]

        All th domain functions have 3 arguments
        The field to search.
        The table/query to search
        A where clause (optional)

        So -
        =DCount("Member shipID","tblCus tomer","[City]='London')


        Wayne Gillespie
        Gosford NSW Australia

        Comment

        • DP

          #5
          Re: total or sum function?

          i understand. sorted.

          thanx,

          dev

          "Wayne Gillespie" <bestfit@NOhotm ailSPAM.com.au> wrote in message
          news:h267t1t4ta 7skc2ubh745jjlg ugr7g3e5e@4ax.c om...[color=blue]
          > On Sun, 22 Jan 2006 13:41:09 GMT, "DP" <DP@hotmail.com > wrote:
          >[color=green]
          > >hi
          > >
          > > that worked thanc.
          > >
          > >how would i look fro something more specific. e.g.
          > >i've got a field called 'city', how would i count teh number of people,[/color][/color]
          say[color=blue][color=green]
          > >from london?
          > >
          > >i've got
          > >
          > >=DCount("Cit y = 'London'","tblC ustomer")
          > >
          > >and its saying 2, but there is only one eprson from london.
          > >
          > >thanx
          > >
          > >devin
          > >[/color]
          >
          > All th domain functions have 3 arguments
          > The field to search.
          > The table/query to search
          > A where clause (optional)
          >
          > So -
          > =DCount("Member shipID","tblCus tomer","[City]='London')
          >
          >
          > Wayne Gillespie
          > Gosford NSW Australia[/color]


          Comment

          Working...