显示并告知相关记录的数量 [英] show and tell number of related records

查看:56
本文介绍了显示并告知相关记录的数量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我确定这一定是可能的,但我仍然是新手,不知道怎么做。


第一部分:

使用好的'ol客户和订单表和表单示例 - 我如何在客户表单上放置一个小文本框,显示任何给定记录(客户),客户的相关订单数量? br />

在伪代码中,它可以计算订单中的记录数量,其中Customer_ID = X.


代码是在VB部分还是在$ {是
第二部分:

我想在客户表单上有一个按钮,上面写着 ;告诉我与该客户相关的订单。这将打开启动订单表单,但只会有与该Customer_ID相关的记录。换句话说,Orders表中可能有75条记录,但单击该按钮仅显示记录17-23(例如)。用户仍然可以添加新记录,但仅限于同一个客户ID。


这有多难?


谢谢你任何帮助!

I''m sure this must be possible but I''m still a newbie and not sure how to do it.

Part One:
Using the good ''ol customers and orders tables and forms example - how would I go about putting a little text box on the customers form that shows, for any given record (customer), the number of related orders that customer has?

In pseudocode its something like count the number of records in Orders where Customer_ID = X.

Would the code go in the VB section or in the Properties panel of a textbox that was bound by a query?

Part Two:
I would like to have a button on the Customers form that says "show me the orders related to this customer". This would open launch the Orders form but would only have those records related to that Customer_ID. In other words, there could be 75 records in the Orders table but clicking that button only shows records 17-23 (for example). The user would still have the ability to add new records but only for that same customer id.

How difficult is this?

Thanks for any help!

推荐答案


我肯定这一定是可能的,但我还是个新手不知道怎么做。


第一部分:

使用好的'ol客户和订单表格和表格示例 - 我将如何进行推杆客户表单上的一个小文本框,对于任何给定的记录(客户),显示客户的相关订单数量?


在伪代码中,它可以计算记录数量在Customer_ID = X的订单中。


代码是否会进入VB部分或受查询约束的文本框的属性面板中?


第二部分:

我想在客户表格上有一个按钮,上面写着告诉我相关的订单 o这个客户。这将打开启动订单表单,但只会有与该Customer_ID相关的记录。换句话说,Orders表中可能有75条记录,但单击该按钮仅显示记录17-23(例如)。用户仍然可以添加新记录,但仅限于同一个客户ID。


这有多难?


谢谢你任何帮助!
I''m sure this must be possible but I''m still a newbie and not sure how to do it.

Part One:
Using the good ''ol customers and orders tables and forms example - how would I go about putting a little text box on the customers form that shows, for any given record (customer), the number of related orders that customer has?

In pseudocode its something like count the number of records in Orders where Customer_ID = X.

Would the code go in the VB section or in the Properties panel of a textbox that was bound by a query?

Part Two:
I would like to have a button on the Customers form that says "show me the orders related to this customer". This would open launch the Orders form but would only have those records related to that Customer_ID. In other words, there could be 75 records in the Orders table but clicking that button only shows records 17-23 (for example). The user would still have the ability to add new records but only for that same customer id.

How difficult is this?

Thanks for any help!



1)你不需要任何代码。只需将文本框的控件源设置为:

1) You don''t need any code. Just set the the control source of the textbox to:

展开 | 选择 | Wrap | 行号



1)你不需要任何代码。只需将文本框的控件源设置为:
1) You don''t need any code. Just set the the control source of the textbox to:
展开 | 选择 | Wrap | 行号



文本框显示#Name?这是因为我还没有任何记录吗?我希望如果是新客户说,或者没有任何订单的客户,它将默认为0。或者这是否意味着我没有正确的语法?


谢谢!
The textbox is showing "#Name?" Is this because I don''t have any records yet? I was hoping it would default to 0 if it were a new customer say, or a customer that didn''t have any orders. Or does it mean I don''t have the syntax right?

thanks!



对不起,带我去吧。离开Me.Customer_ID

Sorry, take the Me. off of Me.Customer_ID


这篇关于显示并告知相关记录的数量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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