如何刷新访问形式 [英] How to refresh an access form

查看:132
本文介绍了如何刷新访问形式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我建立一个MS Access应用程序中,所有的形式都是模态。然而,在表单数据更改后,我想用新数据刷新这个表单的父窗体。有没有办法做到这一点。为了进一步说明:

考虑有两种形式,A型和B.两者都是模式窗体。从表格A,我发起表B,现在表B有用户的关注。但在接近B型的,我想刷新表A.有没有办法做到这一点?

解决方案
  

没有,这就像我要运行的Form_Load   形式A,如果有可能

- Varun的马哈詹

通常的方式做,这是把相关的code的,可以通过两种形式来调用的过程。这是最好把code在标准模块,但你可以把它在一个表格:

B型:

 子RunFormALoad()
   窗体!FormA.ToDoOnLoad
结束小组
 

A型:

 公用Sub的Form_Load()
    ToDoOnLoad
结束小组

子ToDoOnLoad()
    txtText =你好
结束小组
 

I am building an MS Access application in which all the forms are modal. However, after data change in a form, I want to refresh the parent form of this form with newer data. Is there any way to do it. To elaborate further :

Consider there are two forms, Form A and Form B. Both are modal form. From Form A, I initiate Form B, and now Form B has the user attention. But at the close of form B, I want to refresh the Form A. Is there a way to do it?

解决方案

No, it is like I want to run Form_Load of Form A,if it is possible

-- Varun Mahajan

The usual way to do this is to put the relevant code in a procedure that can be called by both forms. It is best put the code in a standard module, but you could have it on Form a:

Form B:

Sub RunFormALoad()
   Forms!FormA.ToDoOnLoad
End Sub

Form A:

Public Sub Form_Load()
    ToDoOnLoad
End Sub    

Sub ToDoOnLoad()
    txtText = "Hi"
End Sub

这篇关于如何刷新访问形式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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