Requery info on one form when second form changed

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
********************************
 
S

sharontodd

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top