Joshua Dalley
Joshua Dalley

Reputation: 339

Microsoft Access How to refresh the parent form from the subform

I know this question has been ask thousands of time, but I couldn't find a direct answer for this problem.

I am a programmer, but I never bothered learning VBA since this is only a small project I am doing on the side. I would prefer only using macro's.

I currently have a parent form inside a navigation menu, which has a datasheet table which display all the information about all the customers.

https://i.sstatic.net/d3TdM.png

In this parent form, I have a button to allow the user to add a new customer which opens a pop up form.

https://i.sstatic.net/RDSvq.png

I want the save button in this pop up form to update the parent form onClose. I know the record is working since if I switch off to a different tab and come back to it. I can see the new record added to the table.

Upvotes: 1

Views: 18323

Answers (1)

Kefash
Kefash

Reputation: 533

Put this on the form frm_addNewCustomer on close event

 Private Sub Form_Close()
     [Forms]![TheFormYouWantUpdated].Refresh
 End Sub

Upvotes: 5

Related Questions