确保在转到新表格之前输入数据? [英] make sure data is entered before going to new form?

查看:43
本文介绍了确保在转到新表格之前输入数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

就像你的岳母经常光顾一样,我回来了。 :-)


我有两张桌子,两张桌子。表1的主键是表2中的外键。我在表格1上有一个打开表格2的按钮,它应该从第一个表格中取出ID自动编号字段,并填写第二个表格上的ID字段(并存储在表格中)。


但它没有用。我的猜测是,从技术上来说,第一种形式的数据还没有填充数据库,所以它不能被转移到形成两个。


所以我怎么告诉Access当我点击按钮打开表格2时,继续将表格1中输入的所有数据粘贴到数据库中(但你不必去新的记录,只需保留,而表格二是正在填写 - 最终它将被关闭。


这是一个重新查询或刷新或类似的东西?


感谢任何和所有的帮助,

梅丽莎: - )

Like your mother-in-law that visits too often, I am back. :-)

I have two tables, two forms. The primary key of table 1 is a foreign key in table two. I have a button on form one that opens form two and it should take the ID autonumber field from the first form and populate the ID field on the second form (and get stored in the table too).

But it''s not working. My guess is that technically the data from the first form hasn''t populated the database yet so it can''t get carried over to form two.

So how do I tell Access that when I click the button to open up form two, go ahead and stick all the data that was entered on form one into the database (but you don''t have to go to a new record, just stay put while form two is being filled out - eventually it will be closed).

Is it like a requery or refresh or something like that?

thanks to any and all help,
melissa :-)

推荐答案

有点累(感觉脑死了)这应该有用,但我知道有一个更好的方法。

A little tired (feeling brain dead) this should work but I know there is a better way.

展开 | 选择 | Wrap | 行号


再次向我提供帮助。 :-)


好​​吧,我想我知道脏的是你的表格上的数据还没有输入好吗?但是什么是书签?
Denburt to my rescue again. :-)

Okay I think I know that dirty is when you have data on a form that hasn''t been entered yet right? But what is bookmark?


这就是它所说的大声笑。 ;)书签仅标记您的位置,以便在您重新查询表单后,您可以返回当前位置。如果您有6条记录但是您的编辑记录2则在您重新查询之后将返回第二条记录。 :)您可以在记录集中使用它,或者也可以在记录集克隆和表单之间进行同步(也许您搜索了记录集,发现您的记录现在想要显示它)。


我。 bookmark = rs.bookmark
It is what it says it is lol. ;) A bookmark merely marks your position so that after you requery the form you can return to your current location. If you have 6 records but your editing record 2 then after you requery thats where you will return the second record. :) You can use that in your recordsets and such or maybe synchronize between a recordsetclone and your form (maybe you searched the recordset found your record now want to display it).

me.bookmark = rs.bookmark


这篇关于确保在转到新表格之前输入数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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