如何创建一个标识符来表示顺序中断? [英] How to create an identifier to indicate a break in sequence?

查看:75
本文介绍了如何创建一个标识符来表示顺序中断?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试修改Access 2003 Sales报表,该报表会提取分配给销售订单的序列号。所需的修改是添加一个标识符(任何东西,颜色等等),以显示序列号序列中断时。


示例:销售订单#46783 < br $>
SN'的分配和发货

4670110

4680110

** 4700110

4710110

4720110

4730110

** 4780110

4790110


**标识此销售订单序列号序列的中断。


我的困境是如何在报表上创建此标识符。该报告与VBA中的SQL语句相关联。


我对Access和VBA的了解有限,所以非常感谢任何帮助。

I am trying to modify a Access 2003 Sales report that pulls serial numbers assigned to sales orders. The modification needed is to add an identifier (anything, color, etc...) to show when there is a break in the serial number sequence.

example: Sales order # 46783
SN''s assigned and shipped
4670110
4680110
**4700110
4710110
4720110
4730110
**4780110
4790110

** Identifies a break in the serial number sequence for this Sales order.

My dilemma is how to create this identifier on the report. The report is tied to an SQL statement in VBA.

I have limited knowledge of Access and VBA, so any help is greatly appreciated.

推荐答案

亲爱的Swen


我上传了一个使用报告Detail_Format事件显示或隐藏行的简单示例,具体取决于序列号是否是连续的。如果您对代码有任何疑问,请随时提出。我也在这里发布了代码。

Dear Swen

I have uploaded a simple example of using the reports Detail_Format event to show or hide a line depending on whether or not the serial number is sequential. If you have any questions regarding the code, feel free to ask. I have also posted the code here.

展开 | 选择 | Wrap | 行号


TheSmileyOne


谢谢你的附件和代码。我更改了代码以应用于我的报告中的字段,但无法使其工作。


以下是我的报告生成的代码:

TheSmileyOne

Thank you for the attachement and code. I changed the code to apply to the fields within my report and was not able to get it to work.

Here is the code that my report is generated from:

展开 | 选择 | 换行 | 行号


我得到了Line skipper上班。我不得不添加SerialNo。字段到报告,更改代码以查看该字段,并计算+ 1。


现在我收到调试消息您输入的表达式没有值 ; onlngLast = Me.SerialNo。当用户没有输入任何在报告打开时调用msgbox代码的搜索条件时会发生这种情况。


我是否需要更改Line skipper的位置?代码还是我错过了一些简单的东西?
I got the "Line skipper" to work. I had to add the "SerialNo" field to the report, change the code to look at that field, and calculate "+1".

Now I get a debug message "you entered an expression that has no value" on "lngLast = Me.SerialNo". This happens when the user does not enter any search criteria which invokes the msgbox code on the report open.

Do I need to change the location of the "Line skipper" code or am I missing something simple?


这篇关于如何创建一个标识符来表示顺序中断?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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