在表单上循环记录的问题 [英] Problem cycling through records on a form

查看:77
本文介绍了在表单上循环记录的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我有一个简单的表格和一个与之关联的表格用于数据输入。我想允许用户能够在表单上打开特定记录以进行数据输入。因此,我创建了一个单独的表单,其中包含用于选择记录ID的控件。选择记录ID后,用户将直接访问主表单上的该记录。


这就是问题:一旦用户在主表单上的所选记录中,我希望他们能够循环浏览他们选择的记录ID两侧的记录。我无法做到这一点。我尝试使用向导为下一条记录创建记录导航按钮。和之前的记录但那不会起作用。是否有代码我可以编写自定义按钮来根据记录ID循环记录?


任何帮助将不胜感激!


-

解决方案

< blockquote class =post_quotes>



我有一个简单的表格和一个与之关联的表格用于数据输入。我想允许用户能够在表单上打开特定记录以进行数据输入。因此,我创建了一个单独的表单,其中包含用于选择记录ID的控件。选择记录ID后,用户将直接访问主表单上的该记录。


这就是问题:一旦用户在主表单上的所选记录中,我希望他们能够循环浏览他们选择的记录ID两侧的记录。我无法做到这一点。我尝试使用向导为下一条记录创建记录导航按钮。和之前的记录但那不会起作用。是否有代码我可以编写自定义按钮来根据记录ID循环记录?


任何帮助将不胜感激!


- A



之前做其他任何事情,将您的主表单放在设计视图中,调用属性表,并设置以下2个属性:

导航=是

周期=所有记录



在执行任何其他操作之前,将主窗体放在设计视图中,调用属性表,并设置以下2个属性: />

导航=是

周期=所有记录



我试过了。启用导航按钮并循环=所有记录。当我直接打开主窗体时,这是有效的。但是,当我使用我的第二个表单来选择记录ID并转到那个方式的主表单时;它只显示一条记录,我不能循环记录。


- A



我试过了。启用导航按钮并循环=所有记录。当我直接打开主窗体时,这是有效的。但是,当我使用我的第二个表单来选择记录ID并转到那个方式的主表单时;它只显示一条记录,我不能循环记录。


- A



好​​的,听起来你在主窗体上显示记录时应用了一个过滤器。如果是这种情况,则需要关闭过滤器,或者您需要使用不使用过滤器的方法在主窗体中显示记录。


It如果您要发布用于在主窗体中显示所选记录的代码,以及主窗体的记录源(如果有),将会很有帮助。


Hi,

I have a simple table and a form associated with it for data entry. I wanted to allow users to be able to open a specific record on the form for data entry. I therefore created a separate form with a control for choosing record ID''s. After choosing a record ID users are taken directly to that record on the main form.

This is the problem: Once users are at their chosen record on the main form, I want them to be able to cycle through records on either side of the record ID they have chosen. I am unable to do this. I tried to use the wizard to create the record navigation buttons for "next record" and "previous record" but that dosen''t work. Is there code I can write for custom buttons to cycle through records based on the record ID?

Any help will be appreciated!

- A

解决方案

Hi,

I have a simple table and a form associated with it for data entry. I wanted to allow users to be able to open a specific record on the form for data entry. I therefore created a separate form with a control for choosing record ID''s. After choosing a record ID users are taken directly to that record on the main form.

This is the problem: Once users are at their chosen record on the main form, I want them to be able to cycle through records on either side of the record ID they have chosen. I am unable to do this. I tried to use the wizard to create the record navigation buttons for "next record" and "previous record" but that dosen''t work. Is there code I can write for custom buttons to cycle through records based on the record ID?

Any help will be appreciated!

- A

Before doing anything else, place your main form in design view, invoke the property sheet, and set the following 2 properties:

Navigation= Yes
Cycle = All records


Before doing anything else, place your main form in design view, invoke the property sheet, and set the following 2 properties:

Navigation= Yes
Cycle = All records


I tried that. Navigation buttons are enabled and Cycle = All records. That works when I open the main form directly. However when I use my second form to choose a record ID and goto the main form that way; it shows only one record and I can''t cycle through the records.

- A


I tried that. Navigation buttons are enabled and Cycle = All records. That works when I open the main form directly. However when I use my second form to choose a record ID and goto the main form that way; it shows only one record and I can''t cycle through the records.

- A

Ok, it sounds like you apply a filter when displaying a record on the main form. If that is the case, either the filter needs to be turned off, or you need to use a method that does not use a filter to display the record in your main form.

It would be helpful if you would post the code you use to display the selected record in the main form, and also the record source (if any) for your main form.


这篇关于在表单上循环记录的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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