Refresh all button works but me.refresh does not (1 Viewer)

DanTheMan

New member
Local time
Today, 08:36
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?
 

theDBguy

I’m here to help
Staff member
Local time
Today, 08:36
Joined
Oct 29, 2018
Messages
21,358
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)
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 23:36
Joined
May 7, 2009
Messages
19,169
if only the Refresh All button will work, then translate it into code:

commandbars.ExecuteMso "DataRefreshAll"
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 08:36
Joined
Aug 30, 2003
Messages
36,118
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

Top Bottom