Buffistechnology 2: You Made Her So She Growls?
Got a question about technology? Ask it here. Discussion of hardware, software, TiVos, multi-region DVDs, Windows, Macs, LINUX, hand-helds, iPods, anything tech related. Better than any helpdesk!
Sophia, calculations in Access are done either in queries, or in controls on forms or reports. For example, if you have two numbers in the table, say [payment1] and [payment2], you would create a control on the report with the control source equal to "=[payment1]+[payment2]".
You could also do the same as a field in a query, and just use the query as your data source for the report.
For example, if you have two numbers in the table, say [payment1] and [payment2], you would create a control on the report with the control source equal to "=[payment1]+[payment2]".
You could also do the same as a field in a query, and just use the query as your data source for the report.
So, I did this, but it just shows as blank, even if there are numbers in Payment 1 and Payment 2. I used the expressions builder, so I doubt I spelled anything wrong. Does it matter that I am adding 2 currency fields?
Shouldn't. At worst, the third control will show a decimal without the dollar sign.
I will say that Access does have a lot of hidden gotchas, and the help files suck, especially in 2000.
Although now that I say that, if you're doing it the calculation in a report control, the references shouldn't be to the fields, but rather to the controls the numbers are in on the report. For example, if you look at the properties of a control, there are both a control source (the field name), and a control name (usually also the field name, but can be different). If they are different, you have to use the control name. Also, if they are the same, the report will often get confused as to what you're referring to, so it's better to change the control name to something other than the field name and use that.
Well, I have learned that the help files suck.
I tried what you suggested, but it still just shows up blank on a report. I REALLy want this to work, because otherwise I will have to type the information twice, once into excel for the accountant and once into the database for the teacher.
I am going to cry now.
But thank you.
For anyone else's information, I sort of figured it out. My problem was that it won't add it if there is nothing entered in BOTH the fields used. So if I put a 0 in the fields used, the expression will add.
It seems like there should be a cleaner way, but....
Yup. You can't add nulls. What you can do perhaps is set the default value of the field to zero.
Oh. I was thinking it was something like that, but I misunderstood your post so I just got confused.
You can also do this:
=nz([payment1],0)+nz([payment2],0)
The nz(x,y) function will convert x to y if x is null.
eta: Huh. There should be no space after the "["
Sophia, I created a quick Access db with a table with the fields Payment1 and Payment2 and a report that shows each field and the sum of the two. Let me iterate how I set things up and maybe you'll spot something that you missed.
Table tblPayments:
Field: Payment1 Currency, Decimal Places: 0, Default: 0
Field: Payment2 Currency, Decimal Places: 0, Default: 0
Report rptPayments:
Report: Record Source: tblPayments
Text Box:Name: txtPayment1, Control Source: Payment1, Format: Currency,Decimal Places: Auto
Text Box:Name: txtPayment2, Control Source: Payment2, Format: Currency,Decimal Places: Auto
Text Box:Name: txtSumPayments, Control Source: =[Payment1]+[Payment2], Format: Currency,Decimal Places: Auto
HTH
Thanks guys. After using Filemaker for so long, I am finding this really frustrating, and I can't find a good student registration database to look at the inner workings of. (I found when learning Filemaker that looking at sales-type databases didn't seem to help me much)
From Slashdot:
"Google's new IM service is already live. All you need is a Jabber-compatible Instant Messaging client (such as Apple's iChat, or gaim), and a GMail address." This should answer, at least in part, all of the speculation that has been flying around the net over the last couple of days. Stay tuned to Google tomorrow for details.
[link]
Huh. I have iChat and a GMail address....
eta: I'm logged in. I just have no one to talk to.