将数据从一条记录发布到下一条记录中 [英] posting data from one record into the next record

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

问题描述

我正在使用Access 2003.


我有一个表格标有位置1 T1,位置1 T2,位置2 T1和位置2 T2的表格。当我创建一个新记录时,除非在新记录上选中是/否复选框,否则我希望将相同的值保存到新记录中(除非选中该复选框,否则我也希望将该条目全部灰显以进行更新 - 我发现了)。我查看了所有属性,但没有办法做到这一点。


非常感谢任何帮助。

解决方案

我刚想到这个(不知道它是否会起作用) ):


我想我可以在表单上放置一个按钮,首先将这些字段记录为数字(即numP1t1,numP1t2,numP2t1,numP2t2),然后移动到新记录并将这些变量放入正确的字段中。我可以在复选框上使用IF语句使该区域变灰。


会有类似的工作吗?


谢谢

一种不笨拙而且没有设置Dirty标志的方法是根据你提到的CheckBox处理设置各种控件的默认值。

默认值只有在创建记录时才有效。


Access CookBook中有一个很好的工作示例数据库:
http://examples.oreilly.com/accesscook/CDROM/chap09.zip

第五个样本(0905.mdb)是你需要的......


可以推荐这本书:-)


Nic; o)


I am using Access 2003.

I have a form that has text boxes labeled Position 1 T1, Position 1 T2, Position 2 T1, and Position 2 T2. When I create a new record, I want the same values to save into the new record unless a yes/no check box is selected on the new record (I also would like to gray out the entry altogether for update unless the check box is selected-that I found). I have looked all through the properties and can find no way to do this.

Any help is greatly appreciated.

解决方案

I just had a thought on this (do not know if it would work):

I think I could place a button on the form that would first record those fields as a number (i.e. numP1t1, numP1t2, numP2t1, numP2t2), then move to a new record and place those variables into the correct fields. I can gray out the area by using an IF statement on the check box.

Would something like that work?

Thanks


A way to do this which would not be clumsy and not set the Dirty flag, would be to handle setting the defaults for the various controls depending on the CheckBox you mention.

A default value only ever has an effect when the record is created.


There''s a nice working sample database in the Access CookBook:
http://examples.oreilly.com/accesscook/CDROM/chap09.zip
The fifth sample (0905.mdb) is the one you need..

Can recommend the book :-)

Nic;o)


这篇关于将数据从一条记录发布到下一条记录中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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