But I understand. You gave up everything you had to find me. And you found me broken. It's hard for you.

River ,'Safe'


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!


DXMachina - Aug 23, 2005 10:36:24 am PDT #4157 of 10003
You always do this. We get tipsy, and you take advantage of my love of the scientific method.

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.


Sophia Brooks - Aug 23, 2005 10:49:42 am PDT #4158 of 10003
Cats to become a rabbit should gather immediately now here

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?


DXMachina - Aug 23, 2005 10:58:50 am PDT #4159 of 10003
You always do this. We get tipsy, and you take advantage of my love of the scientific method.

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.


Sophia Brooks - Aug 23, 2005 11:07:52 am PDT #4160 of 10003
Cats to become a rabbit should gather immediately now here

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.


Sophia Brooks - Aug 23, 2005 11:41:26 am PDT #4161 of 10003
Cats to become a rabbit should gather immediately now here

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....


DXMachina - Aug 23, 2005 11:48:07 am PDT #4162 of 10003
You always do this. We get tipsy, and you take advantage of my love of the scientific method.

Yup. You can't add nulls. What you can do perhaps is set the default value of the field to zero.


tommyrot - Aug 23, 2005 11:49:17 am PDT #4163 of 10003
Sir, it's not an offence to let your cat eat your bacon. Okay? And we don't arrest cats, I'm very sorry.

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 "["


Eddie - Aug 23, 2005 11:58:25 am PDT #4164 of 10003
Your tag here.

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


Sophia Brooks - Aug 23, 2005 12:01:16 pm PDT #4165 of 10003
Cats to become a rabbit should gather immediately now here

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)


tommyrot - Aug 23, 2005 2:25:31 pm PDT #4166 of 10003
Sir, it's not an offence to let your cat eat your bacon. Okay? And we don't arrest cats, I'm very sorry.

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.