Article View: comp.databases.ms-access
Article #43Q: MISC questions
From: Karl Voit
Date: Tue, 28 Oct 1997 00:00
Date: Tue, 28 Oct 1997 00:00
89 lines
3234 bytes
3234 bytes
Hi!
The manuals are very confusing to me and so I have to ask some
Access2.0-freaks to help me on these problems:
(btw, I am speaking german and my Access2.0 too :-)
So please ignore the mistakes I made in the translation.)
I've got an endless-form for my telephone-database:
room: number of the room (1-4)
date: date of the call
cost: cost of the telephone-call
sum: number of received impulses so far (1 pulse received -> +0.8 costs)
text: -
sheet: number of the sheet, on which the call was noticed
Problem 1:
I want to calculate the cost by multiplying the difference of the sum by 0.8
e.g.: cost = ( sum - sum.old ) * 0.8
So, how do I refer to the sum.old-field?
Can I just enter the calculation or do I have to use a querry or so?
Problem 2:
Sheet should be the number of the sheet one line above, so I just have
to change it, when a new sheet is written.
That should be the same problem like question 1 or is this easier?
Problem 3:
In a querry, I've got this:
In (SELECT [Zi1] FROM [Konto] As Tmp GROUP BY [Zi1] HAVING
Count(*)>1) And Yes
...and I want to change "Zi1" to "Zi2" and "Zi3" or "Zi4" from time to time,
so I wrote a function to return Zi1, ... , Zi4. It's called GetZi() and
returns Zi1 or Zi2, or ...
BUT: In the querry, I can't write it like this:
In (SELECT [=GetZi()] FROM [Konto] As Tmp GROUP BY [=GetZi()] HAVING
Count(*)>1) And Yes
...without getting errors. It seems to me that Access dosn't want any
function-calls in a querry.
Is this impossible to do so?
Problem 4:
I've got another endless-form:
[...] some things that doesn't matter here
Sum: cost of a product
Zi1: Yes/No, if the room 1 is concerned
Zi2: Yes/No
Zi3: Yes/No
Zi4: Yes/No
I want to calculate the costs of room 1, 2, 3 or 4 and therefore, I have
to make a querry to get the number of rooms concerned of that line like:
Sum Zi1 Zi2 Zi3 Zi4 -> NrOfYes -> CostForEachParty
21 Y Y N Y 3 (21/3=) 7
30 N Y Y N 2 (30/2=) 15
How can I do that?
TNX a lot even if you can help me with only ONE of the problems...
PS: German answers are accepted too :-)
PPS: Please reply with EMail too - if it's not a problem.
---
Karl VOIT alias vk@sbox.tu-graz.ac.at
Student @ University of Technology of GRAZ (Austria)
(No, we have no Kangaroos!)
Further information on http://www.sbox.tu-graz.ac.at/home/vk/
Technical Details
Message-ID:
<6352mr$cbg@fstgal00.tu-graz.ac.at>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f67eb,17ab5fef9423dcf5 X-Google-Attributes: gidf67eb,public X-Google-Thread: 1668c5,17ab5fef9423dcf5 X-Google-Attributes: gid1668c5,public X-Google-Thread: ff0ac,17ab5fef9423dcf5 X-Google-Attributes: gidff0ac,public X-Google-Thread: 102b1d,17ab5fef9423dcf5 X-Google-Attributes: gid102b1d,public From: vk@sbox.tu-graz.ac.at (Karl Voit) Subject: Q: MISC questions Date: 1997/10/28 Message-ID: <6352mr$cbg@fstgal00.tu-graz.ac.at> X-Deja-AN: 286235705 Organization: Graz University of Technology, Austria Newsgroups: comp.databases.ms-access,at.fido.msaccess,de.comp.datenbanken.ms-access,microsoft.public.de.access