How to update access form

I am creating an MS Access application in which all forms are modal. However, after changing the data in the form, I want to update the parent form of this form with the new data. Is there any way to do this. Further clarification:

Consider two forms: Form A and Form B. Both of them are modal. From form A, I initiate form B, and now form B draws the attention of the user. But at the end of Form B, I want to update Form A. Is there a way to do this?

+5
source share
5 answers

No, it looks like I want to run Form_Load of form A, if possible

- Varun Mahajan

- , . , a:

B:

Sub RunFormALoad()
   Forms!FormA.ToDoOnLoad
End Sub

A:

Public Sub Form_Load()
    ToDoOnLoad
End Sub    

Sub ToDoOnLoad()
    txtText = "Hi"
End Sub
+6

/ :

B:

Forms!FormA.Requery

, ?

+6

"Requery" , , Form A "On Got Focus". Form_Load, , Form_Got_Focus.

+1

REQUERY , Cmd.Close. , , .

DoCmd.Close
Forms![Form_Name]![Combo_Box_Name].Requery

Dim id As Integer
id = Me.[Index_Field]
DoCmd.Close
Forms![Form_Name]![Combo_Box_Name].Requery
Forms![Form_Name]![Combo_Box_Name] = id

, .

let's say that you save School_Index and School_Name in the school table and refer to it in the Student table (which contains only the School_Index field). while you are editing a student, you need to associate it with a school that is not in your school chart, etc. etc.

0
source

to update the form you need to enter - me.refresh in the button event when clicked

-1
source

All Articles