473,385 Members | 1,570 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Adding values for a period of time in access database

Good Day Friends

Thanks a lot for the Guidance through Questions answered

Well, am working on a Customer Database and in my Developments I would Like to Guide on how to I can Develop a Function that can Enable me Sum up a Particular Customer Deposits for a period of 60 days , which installments are paid for a Good once the Whole amount is Completed the Customer Takes the Good paid for and the Same Customer can pay for the Very Good another time in Particularly installments,

Am using this , but its not Giving Results

=Nz(DSum("Deposit","Payments","Customer ='" & [Customer] & "Datepaid>=#" & Date()-60 & "#""'"),0)


I will be so Gratefull when helped
Oct 27 '21 #1
2 7810
isladogs
455 Expert Mod 256MB
If I understand you correctly, get rid of your expression and create an aggregate (totals) query on table Payments.
Group by Customer, filter DatePaid >Date()-60 and Sum the Deposit field. ... or possibly Sum the expression Nz(Deposit,0)

If you need additional fields, group by those as well but only add extra fields if absolutely necessary or your results may not be what you want.
Oct 29 '21 #2
cactusdata
214 Expert 128KB
A little correction of the where clause will do it:

Expand|Select|Wrap|Line Numbers
  1. =Nz(DSum("Deposit","Payments","Customer ='" & [Customer] & "' And Datepaid >= DateAdd('d', -60, Date())"),0)
Oct 30 '21 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Sérgio Almeida | last post by:
Greetings I'm having problems adding records to an access database. What I want to do is very simple. Here is my code. __CODE_START__ dim sqlStatement sqlStatement="insert into...
6
by: John Ortt | last post by:
I have created an Access Database to store information from my various bank accounts and keep track of my finances. Everything works great, except that I decided not to keep the balance data on...
0
by: cdginc | last post by:
Hello, I am trying to implement a sales cart application that uses VBScript and writes the data to an Access database. This is a prepackage software that I am trying to customize for my needs. ...
1
by: MadCrazyNewbie | last post by:
Hey Group, Wonder if somebody could help me please? Im after a way in either Access or SQL to be able to store .xls, .doc, .pdf & a few other files? Is this possible, anybody got any links...
11
by: johnb41 | last post by:
I need to Add, delete, rename, etc columns in my Jet/Access database in my app. I know I can add columns for a dataset, and work with it, but as far as I know there is no way to push the added...
6
by: kareemaffan | last post by:
Hello Everyone I want to insert values into MS Access database through VB.NET in Visual Studio 2005 . I have used the following code which is not working. Private Sub Button2_Click(ByVal sender...
2
by: chamali | last post by:
Hi guys, I have created database using ms access & i have ceated a form using vb.net. i want to do this. when i enter the data to the form & after that click Submit button the data must be enter...
0
by: YangHoka36 | last post by:
Hey everyone i need help, i am trying to make a log in form where a user keys in their username and password and they are checked from the database then log in access or restriction follows after. My...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.