多场值交叉和 [英] Multi field value cross sum

查看:75
本文介绍了多场值交叉和的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在ms访问表格中有问题。

我有两个字段

1)性别=男性或女性价值



2)国家=伦敦或德国

现在我想添加几个可以显示的方框

1)女性总数来自伦敦

2)来自德国的女性总人数和

3)来自伦敦的男性总人数

4)男性总人数德国

我是社会学教师,不知道怎么写vb代码。我在文本框的控制源中尝试了一个表达式 -

= Sum(IIf([Gender] =" Male"& [City] =" London"))

但这个表达并没有提供我来自伦敦的男性总数。

请帮忙,我想用这个表格来帮助我的学生参与他们的项目。

请healp。

Hi, i have a problem in ms access form.
I have two fields
1) Gender = male or female values
and
2) Country = London or Germany
Now i want to add few boxes in form which can display
1) Total number of female from London
2) Total number of female from Germany and
3) Total number of male from London
4) Total number of male from Germany
I am a teacher of sociology and don''t know how to write a vb code. I tried an expression in control source of the text boxe -
=Sum(IIf([Gender]= "Male" & [City]= "London"))
But this expression didn''t provide me total numbers of Male from London.
Please help, i want to use this form to help my student in their project.
Please healp.

推荐答案

Jugnu,


我们很乐意提供帮助,但我们很难协助不知道你的项目数据是如何构建的。


一般来说,我认为你提出的问题相对简单,但我们无法提供答案来自您的更多信息。


您的数据如何存储?您是否有每个人的记录,在每个记录中显示该人是男性还是女性以及他们来自哪里?


这些额外信息将帮助我们指导您找到解决方案。


谢谢。
Jugnu,

We would love to help, but it is difficult to assist when we don''t know how you have your data structured in your project.

In general, I think what you are asking is relatively simple, but we are unable to provide an answer without some further information from you.

How is your data stored? Do you have a record for each individual, indicating in each record whether the person is Male/Female and where they are from?

This additional information will help us guide you to a solution.

Thanks.


嗨twinnyfo,

感谢您的回复。

我在数据库中有一个表格,这些是列 -

1)学生姓名

2)性别

3)DOB

4)国家

5)课程

6)家庭住址,在家庭住址我们只输入国家名称,如伦敦或德国。

我们记录每个学生姓名,在每个记录中显示该人是男性还是女性以及他们来自何处。

现在我们要计算 -

1)如何许多女性来自伦敦

2)有多少女性来自德国

3)有多少男性来自伦敦

4)有多少男性来自德国。

我不知道怎么写vb代码或表达式f或者,请帮忙。

很多人都对你的出色支持表示满意。
Hi twinnyfo,
Thanks for your kind reply.
I have a table in database where these are columns-
1) Student name
2) Gender
3) DOB
4) Country
5) Course
6) Home Address, in home address we only put country name like London or Germany.
We record for each Student name, indicating in each record whether the person is Male/Female and where they are from.
Now we want to count -
1) how many females are from London
2) how many females are from Germany
3) how many males are from London
4) how many males are from Germany.
I don''t know how to write a vb code or expression for this, please help.
Many regards for your outstanding support.


你可以使用Cross Tab Query获得你想要的结果,会创建两列(一个用于男性,一个用于女性)和多行,因为你有不同的国家。


如果你需要将它放入一个表单,你可以(和我会建议作为一个连续的形式)。这取决于您使用的数据。


同样,提供的信息不多。
You can get the results of what you are looking for using a Cross Tab Query, which would create two columns (one for male and one for female) and as many rows as you have different countries.

If you need to put this into a form, you can (and I would recommend as a contiuous form). It just depends on what you are using the data for.

Again, not much information has been provided.


这篇关于多场值交叉和的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆