如何在连续报表上运行函数(ping IP_Address字段值) [英] How to run a function (which pings the IP_Address field value) on a continuous report

查看:85
本文介绍了如何在连续报表上运行函数(ping IP_Address字段值)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在网上搜索了,但由于我是VBA的初学者,我没有找到问题的具体答案。事实上,我有一个带打印机的数据库,我想以连续的形式显示它们的列表(形式不是对标题抱歉)并且每行都有ping状态。我已经有一个ping IP_Address值并返回True或False的函数。这显然适用于只有一个打印机然后一个IP_Address值的表单,但不是连续形式,我有一个IP地址列表。如何以连续形式在每个IP地址值上运行此功能(如果ping并修改未绑定字段以指示打印机是否ping,则获取True / False值的目的)?我希望很清楚。非常感谢你提前。

Hi, I already search on the web but as I''m a beginner in VBA I didn''t find the specific answer to my question. In fact I have a DB with Printer and I would like to display a list of them in a continuous form (form not a report sorry for the title) and have a ping status on each row. I already have a function wich ping the IP_Address value and return a True or False. This obviously works well on a form with just one printer and then one IP_Address value, but not in the continuous form where I have a list of IP Addresses. How can I run this function on each IP Address value in the continuous form (in the purpose to get the True/False value if it ping and modify an unbound field to indicate if the printer ping)? I hope it is clear. Thank you very much in advance.

推荐答案

根据你的帖子修正你的标题。


你的功能应该参考控件在您的表单上具有IP地址(说它的名称为txt_ctrl_printerip)并输入{unbound control}的控制源(比如说它的名称为txt_ctrl_pingstate),这样条目就是沿着 = fnc_printer_ping([txt_ctrl_printerip])
Fixed your title per your post.

Your function should refer to the control on your form that has the IP address (say it''s named "txt_ctrl_printerip") and be entered into the control source of {unbound control} (say it''s named "txt_ctrl_pingstate") so that the entry is something along the lines of =fnc_printer_ping([txt_ctrl_printerip])


你必须在作为记录源的查询中调用你的Ping函数对于表格。这将创建另一个字段,可以提供您的真/假结果。但是,由于必须ping每个IP地址,因此可能需要很长时间才能打开表单。需要考虑的事项。
You would have to call your Ping function in the query that is the recordsource for the form. This would create another field that would give you your true/false result. However, this has the potential to take a long time to then open the form as it is having to ping each IP address. Just something to consider.


@Seth Schrock


您好Schrock,谢谢你的回复,我从这里打开表格:
@Seth Schrock
Hi Schrock, thank you for your reply, I open the form from this:
展开 | 选择 | Wrap | < span class =codeLinkonclick =LineNumbers(this);>行号


这篇关于如何在连续报表上运行函数(ping IP_Address字段值)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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