dsum

mlyles

Registered User.
Local time
Today, 04:26
Joined
Nov 28, 2004
Messages
26
I am trying to make a total text for two fields (don't know if I said that correctly). I have a black field and a red field with many different records for cash totals for each. What I mean is lets say for example there are 8 records on one form and 5 or them are red and 3 are black, each record has a different number for total so what I did was create a text to add up the total for all. Now what I would like to do is add another text that would add up just the red and one for just the black. I think dsum is the correct expression to use with dsum("[total]", "tasks", "[color] like "red"") but when I run it i get Name# or something like that in the box. I don't know if the I linked it to the right domain or what, although I did think it was correct. If anyone could help on what I should do or if there is another way to do it I would really appreciate it. Thanks
 
Im sorry, because I did not explain the information correctly, Im really using the US and Germany and not red and black. For Gemany there is letters in front and then GE and letter after so I am using like for like "*GE*". I think the main problem is in the domain because when I use it to work it has the name# or something like that. Is there a problem with my linking are something. Thanks
 
Im very sorry about not posting the right information and using an example instead, this is my first time posting something since I just signed up yesterday. I came into work today so I am able to get the correct information, here is the code I wrote =DSum(" [Government Workyears]","Costs"," [Appropriation ID] Like "*[GE]*"") and this is the error I get when I look at the form view of the text #Name?. The table Costs contains both the Government Workyears and Appropriation ID. Im not sure if this has to do with the fact that the table Costs is linked from another database or something but when I wrote a query to contain the fields needed it still gave me the same error. Again I am sorry for the inconvience this may have caused.
 

Users who are viewing this thread

Back
Top Bottom