Refresh all button works but me.refresh does not

DanTheMan

New member
Local time
Yesterday, 20:12
Joined
Aug 22, 2019
Messages
1
Hello all. I'm new to this site and I'm hoping someone can help.

I have 2 forms. Form1 is a continuous form with an edit button. The idea is that when the user selects the edit button for any record, form2 is loaded in single form view with only that record. The user then makes edits as necessary, closes form2, and then form1 should reflect the changes made on form2.

However, form1 is not showing the updated values from form2. I have tried me.refresh and me.requery methods on both forms and from form1 to form2 (i.e. form1.refresh).

The only thing that updates form1 after the changes on form2 is the "Refresh All" button. If you select the arrow on that button there is also a "Refresh" button (i.e. without the "All") that does nothing.

Anyone have any ideas?
 
Hi. Welcome to AWF!


You could try opening Form2 in Dialog mode, so you can refresh Form1 after Form2 closes. For example:
Code:
DoCmd.OpenForm "Form2", , , "[ID]=" & Me.ID, , acDialog
Me.Refresh
(untested)
 
if only the Refresh All button will work, then translate it into code:

commandbars.ExecuteMso "DataRefreshAll"
 
Welcome to the site. FYI, I moved your thread out of the introductions forum since it was a technical question.
 

Users who are viewing this thread

Back
Top Bottom