使用数据输入表单滚动查看现有记录 [英] Use data entry form to scroll through existing records

查看:78
本文介绍了使用数据输入表单滚动查看现有记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好!我是新用户,希望在MS Access 2007中获得一些表单问题的帮助我还没有破解。


我已经构建了一个表单提示用户输入新的记录数据,然后单击更新数据库。将记录保存到表中。每个条目在原始表中创建一个新记录(所有数据都转到同一个表)。


我已经使用按钮向导添加了之前的记录。和下一条记录按钮,其工作方式是它们允许用户向前和向后滚动它们在单个会话中输入的所有记录。 (一个会话=在文件打开和文件关闭之间发生的任何事情)但是,当用户到达他们输入的第一个记录并点击之前的记录时再次,消息你不能去指定的记录被展示。我认为这可能与宏有关,所以我进入了GoToRecord。在先前记录中的动作和下一条记录宏并添加了以下参数:


OBJ类型:表

OBJ名称:表1

抵消:1


现在,当用户转到会话中输入的第一条记录并点击之前的记录时,错误消息对象'表1''未打开。


所以我回到导航窗格,打开表1,然后回到表单并尝试点击之前的记录。再次。回到原来的你不能去指定的记录消息再次。


我在输入记录后尝试关闭数据库,然后再次打开它,当我点击之前的记录时当窗体打开时,按钮在控件框中显示所有空白字段时,错误消息您无法转到指定的记录。显示。


我将在我知道的事情结束时尝试 - 如果有人有任何建议/提示,我会很感激!谢谢!

解决方案

你需要进入表格的属性表(不知道你在2007年是怎么做的) )并将数据输入设置为


此属性的名称非常具有误导性!将其设置为是没有必要输入新记录的!将其设置为意味着您只能输入新记录!您无法查看已存在的记录,这就是您的问题所在!


请记住删除您添加到宏中的内容。


Linq ; 0)>


好的,有效! (你是对的,这个术语有误导性 - 从来没有猜到过)


现在唯一的问题是表单打开时显示的是第一条记录中的数据 - 我可以添加一个转到最后一条记录按钮,但我宁愿通过在控件中打开表单并准备接受新记录来消除此步骤(以及某人可能无意中更改了第一条记录)。有没有办法在保持滚动回原先输入的记录的同时执行此操作?


要么:

展开 | 选择 | Wrap | 行号

Hi, all! I''m a new user, looking to get some help on a form problem in MS Access 2007 I haven''t been able to crack.

I''ve built a form that prompts users to enter new record data, then click "Update Database" to save the record to the table. Each entry creates a new record in the original table (all data goes to the same table).

I''ve used the button wizard to add a "previous record" and a "next record" button, which work in the sense that they allow the user to scroll forward and backward through all the records they''ve input in a single "session" (one session = whatever happens between the time the file is opened and the file is closed) However, when a user arrives at the first record they entered and clicks "previous record" again, the message "You can''t go to the specified record" is displayed. I thought this might have something to do with the macro, so I went into the "GoToRecord" action in both the "previous record" and the "next record" macros and added the following arguments:

OBJ Type: Table
OBJ Name: Table1
Offset: 1

Now, when a user goes to the first record entered in the session and clicks "previous record," the error message "The object ''Table1'' isn''t open."

So I went back to the navigation pane, opened up Table 1, then went back to the form and tried to click "previous record" again. Back to the original "You can''t go to the specified record" message again.

I tried closing the database after entering records, then opening it up again, and when I clicked the "previous record" button when the form opened with all blank fields in the control boxes, the error message "You can''t go to the specified record" displayed.

I''m about at the end of what I know to do and try--if anyone has any suggestions/hints, I''d appreciate it! Thanks!

解决方案

You need to go into the Properties sheet for the form (don''t know exactly how you do that in 2007) and set Data Entry to No.

The name for this property is very misleading! Having it set to Yes is not necessary in order to enter new records! Having it set to Yes means that you can only enter new records! You cannot view pre-existing records, which is where your problem lies!

Remember to remove the things you added to the macros.

Linq ;0)>


OK, that worked! (you''re right, the terminology was misleading--never would have guessed that)

Only problem now is that the form opens with the data from the very first record displayed--I could add a "go to last record" button, but I''d rather eliminate this step (and the possibility that someone could change the first record inadvertently) by having the form open up with blank fields in the controls, ready to accept a new record. Is there a way to do this while maintaining the ability to scroll back through previously entered records?


Either :

Expand|Select|Wrap|Line Numbers


这篇关于使用数据输入表单滚动查看现有记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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