将记录添加到记录集 [英] Add records to a recordset

查看:104
本文介绍了将记录添加到记录集的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Access 2007,并且我正在尝试将记录从表添加到记录集。我理解如何添加表中的所有记录,但需要弄清楚如何只在满足条件之前添加记录。每条记录都包含一个镜头字段,其中包含订单的素材。我需要将记录添加到记录集,直到这些素材字段的总数达到预定总数。示例:说预定总数是1,000英尺,我需要记录集停止添加记录时已经添加的记录总计1,000英尺。有没有人知道我会怎么做?


谢谢

I am using Access 2007 and am trying to add records from a table to a recordset. I understand how to add all of the records from the table, but need to figure out how to only add records until a criteria is meet. Each record contains a footage field which contains the footage of an order. I need to add records to the recordset until the total of these footage fields reaches a predetermined total. Example: say the predetermined total is 1,000 feet, I need the recordset to stop adding records when the records already added total 1,000feet. Does anybody have any idea how I would do this?

thanks

推荐答案

@ jmar93


使用带有变量的Do Until ... Loop语句在每个记录添加时捕获脚。这是一个基本的例子

@jmar93
Use a Do Until...Loop statement with a variable to capture the feet as each record is added. This is a basic example

展开 | 选择 | Wrap | 行号


您是一次添加这些,还是想要只需一次选择1000(英尺)?

如果您已经有了一些代码,请发布,并记住在代码周围使用[code] [/ code]标签。
Are you adding these one at a time, or do you want to simply select 1000(ft) at a time?
If you allready have some code, please post that, and remember to use the [code][/code] tags around your code.


我要做的是使用记录集生成一个报告,列出表中最旧的订单,直到他们的累积镜头总数达到预定数量,比如1000英尺。 br />

Ex充足:


订单#1 250英尺

订单#2 200英尺

订单#3 550英尺
<总计1,000英尺的



谢谢,
What I am trying to do is use a recordset to generate a report that lists the oldest orders in a table up to the point were their cumulative footage''s total a predetermined amount, say 1,000feet.

Example:

order #1 250 feet
order #2 200 feet
order #3 550 feet

for a total of 1,000 feet.

thanks,


这篇关于将记录添加到记录集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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