Requery Main form records after updating subform (1 Viewer)

Baldrick

Registered User.
Local time
Today, 01:24
Joined
Jul 2, 2001
Messages
35
OK, my apologies but a "search" for this problem was unsuccessful. I'm sure it's been discussed.

I have a mainform (frmAttendeeProjects) that displays Attendee info. A Sub form, linked by Atten_ID, displays all projects assigned to that Attendee.

I have a control button in the sub form that brings up a form (frmEditProject) to edit the Project info. One of the critical items to edit is the Attendee (for re-assignment)

How do I get my Main form to requery info, so that after closing the Edit Project form I no longer see that project assigned to that Attendee? I've tried to requery on the AfterUpdate event of the Edit Project form, but it's not working.

Thanks in advance.
 

Baldrick

Registered User.
Local time
Today, 01:24
Joined
Jul 2, 2001
Messages
35
I thought I would answer my own question for others' reference.

In the AfterUpdate event of the frmEditProjects (the one I am using to change info), I placed the folowing code:

Private Sub Form_AfterUpdate()
Forms!frmAttendeeProjects.Form.Requery
End Sub

This requeries the main form (frmAttendeeProjects)
 

murray83

Games Collector
Local time
Today, 06:24
Joined
Mar 31, 2017
Messages
737
I thought I would answer my own question for others' reference.

In the AfterUpdate event of the frmEditProjects (the one I am using to change info), I placed the folowing code:

Private Sub Form_AfterUpdate()
Forms!frmAttendeeProjects.Form.Requery
End Sub

This requeries the main form (frmAttendeeProjects)

thanks for this infor but i tried this in the afterupdate and didnt work but when i placed it in event On Click it does and i'm a happy bunny cheers

:cool:
 

Users who are viewing this thread

Top Bottom