Making a cash balance

So what is the outcome now when you put it in the query?

If it was going to remain on the form you could have simply renamed the textbox control.
 
So what is the outcome now when you put it in the query?

If it was going to remain on the form you could have simply renamed the textbox control.

Believe me friend,I tried everything, from new queries to just copying and pasting the text from your message.. I failed miserably, I have tried to change fields to expression, First of all I tried what you wrote and pay attention to the copying an pasting and in the end I only got a result that contained the whole result of the table, I know, I have carefully copied every item and still no joy.. Think it is wrong in my design...
 
Ok, but what is the problem? It's showing an error, or it's showing incorrect info?
 
Ok, but what is the problem? It's showing an error, or it's showing incorrect info?

Problem is that no data is shown at all, or there is no sum based on the day selected or a total sum of the table is displayed, in other instances I can only see single records.. So not the day's total, I will go through the post again and try to recreate from scratch. This is really driving me crazy. Will come back after tomorrow night after the rebuild..
 
Did you apply a Format to that Date/Time field? And is it really a Date/Time field? (can't remember if I asked this question :) )

Try this:
Code:
=DSum("[DayTotal]", "[QryDayPurchase]", "DateValue([D_Date]) = " & Format([NameOfDateFieldOnForm], "\#mm\/dd\/yyyy\#"))
 
Did you apply a Format to that Date/Time field? And is it really a Date/Time field? (can't remember if I asked this question :) )

Try this:
Code:
=DSum("[DayTotal]", "[QryDayPurchase]", "DateValue([D_Date]) = " & Format([NameOfDateFieldOnForm], "\#mm\/dd\/yyyy\#"))

Thank you my Friend, and thanks to all for your suggestions I really got a good understanding of this part of working with queries now, I got it finally working. There was a underlying problem that I have not realised. In both tables I had a field named [Dirt]. After renaming the [Dirt] field in the [tblDocketBuy] to [B_Dirt] problem solved. Now looking for a good place to do a requery after the date has changed, or the Cash Start Amount.. A Me.Requiry in the got focus event of the subject Textbox does the trick for me when I click it.

Couldn't have done it without your help!!
 
Last edited:

Users who are viewing this thread

Back
Top Bottom