Results 1 to 4 of 4

Thread: Access Query [Resolved]

Threaded View

  1. #1

    Thread Starter
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Resolved Access Query [Resolved]

    I have an Access db, and I'm thinking about redoing the actual table to let it include transactions. The client has 4 sites, and wants to use a db with all the records in each site. I need a query to select each record.name and a sum of all the payments. Not sure how to do it.

    VB Code:
    1. cn.Execute "Insert into paymentrecord " & _
    2.       "(LastName, Firstname, LastPayDate, BalanceDue, AmountPaid) " & _
    3.       "Values ('" & txtLastName.Text & "','" & txtFirstName.Text & "','" & _
    4.        CDate(txtLastPaymentDate.Text) & "','" & txtBalanceDue.Text & "','0')"

    There are the fields that I use. I'm going to use a LastPayDate and Amount Paid for each time the client makes a payment. I need to group by lastname, firstname, and calculate the total payment amount. I'l load the result into a listbox like I do now, but if they add records from a different office, it will also work. I'll make the LastPaymentDate a key field so there can't be dups. Only one payment per key record allowed.

    Thanks.
    Last edited by dglienna; Jun 7th, 2005 at 05:03 PM.

Posting Permissions

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



Click Here to Expand Forum to Full Width