程序化更新后刷新复选框控件

编程入门 行业动态 更新时间:2024-10-28 07:24:31
本文介绍了程序化更新后刷新复选框控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

对于Access编程很新,在XP上使用ver 2002 ...希望你能帮忙: 我是以编程方式设置基于命令按钮的复选框控件的值单击事件,但新值(1,即True)不会出现在控件中。我试过了一个问题,但这不行。如果我关闭表格,重新打开并重新选择相关记录,则价值更新已生效。 表格![订单&开票]![InvoicedForCurrentTerm?] = 1 我希望该更新能够在屏幕上反映出来,但不会丢失当前选择的记录。 请用requery或其他方法告知如何执行此操作...如果这是非常明显和基本的东西,请道歉;我在这里搜索网络和论坛无济于事。 非常感谢任何帮助。 Rich

Am new to Access programming, using ver 2002 on XP... Hope you can help please: I am programmatically setting the value of a checkbox control based upon a command button click event, but the new value (1, aka True) does not then appear in the control. I''ve tried a requery but this won''t work. If I close the form, reopen it and reselect the relevant record, the value update has taken effect. Forms![Orders & Invoicing]![InvoicedForCurrentTerm?] = 1 I would then like that update to be reflected on-screen in the form, but without losing the currently selected record. Please advise on how this can be performed, with a requery or other method... Apologies if this is really obvious and basic stuff; I''ve searched the web and the forums here to no avail. Any assistances greatly appreciated. Rich

推荐答案

只需我![InvoicedForCurrentTerm?] = 1 。 欢迎光临TheScripts! Linq ; 0)>

感谢您的建议Linq 不幸的是,这并没有解决问题......它确实似乎成功地将''True''值写入基础表,但它再次没有显示更新的控件''表格中的值,直到我移动到另一个记录并返回到刚刚更新的记录,或者当然关闭表单,重新打开并再次找到该记录...对我而言,它似乎是一个刷新,重新绘制或者需要重新查询,但是当我试过它们时,这些都不会起作用。 为了给它提供更多背景知识,如果它有帮助,可以使用表格Orders& amp ;发票及QUOT;基于选择查询Orders Qry。和记录通过ComboBoxSearchCustomer定位。与该查询相关联。 任何进一步的建议/协助。如何让表单显示控件刚刚更改的值将非常感激。 Rich Thanks for the suggestion Linq Unfortunately this doesn''t solve the problem either... It does appear to successfully write the ''True'' value to the underlying table, but again it doesn''t display the updated control''s value in the form until I either move to another record and back to the one that''s just been updated, or of course close the form, reopen it and find that record again... To me it seems like a refresh, repaint or requery is required, but none of these appear to work when I''ve tried them. To give a little more background, in case it helps, The form "Orders & Invoicing" is based upon a select query "Orders Qry" and records are located via a ComboBox "SearchCustomer" associated with that query. Any further advice/assistance re. how to get the form to display the just-changed value of the control would be much appreciated. Rich

我不知道告诉你,Rich,代码对我来说效果很好!命令按钮和复选框在同一表格上是不是? Iguess你应该在这里发布你的命令按钮后面的代码供我们查看。 Linq ; 0)> I don''t know to tell you, Rich, the code works just fine for me! The command button and the checkbox is on the same form isn''t it? Iguess you should post the code behind your command button here for us to look at. Linq ;0)>

更多推荐

程序化更新后刷新复选框控件

本文发布于:2023-11-26 19:48:23,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1634957.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:控件   复选框

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!