Requery info on one form when second form changed

  • Thread starter Thread starter sharontodd
  • Start date Start date
S

sharontodd

I am allowing the user to return to the original registration form to correct
information. The secondary form "Division Winners Expanded" needs to be
updated after the changes are made.

I have the following code to close the registration form after changing the
information. It should requery the field in "Division Winners Expanded" and
close the registration form. However, the list box "first_data" is not being
updated upon closing registrations.

What am I missing?
*******************************
Private Sub Close_Registr_Click()
On Error GoTo Err_Close_Registr_Click

If CurrentProject.AllForms(Division_Winners_Expanded).IsLoaded Then
Forms!Division_Winners_Expanded!First_data.Requery
Forms!Division_Winners_Expanded!first_data2.Requery

End If

Me.Dirty = False

DoCmd.Close

Exit_Close_Registr_Click:
Exit Sub

Err_Close_Registr_Click:
MsgBox Err.Description
Resume Exit_Close_Registr_Click

End Sub
********************************
 
I had that before and tried it again. I get error "the expression you
entered referes to an object that does not exist or is closed." I when
clicking on the button. Without the quotes, there is not error message but
the winners list is not updated.
 
Back
Top