Good morning
I was hoping someone could help me understand why my VBA code cannot refresh a userform.
I am using Access 2019 and have a simple database that includes a continuous form. Part of the form is a field to display a field from a table. The field is either set to no or yes and is displaying as expected. I am using this method as a workaround for allowing a user to select different records because I was not able to get checkbox controls to work on the continuous form.
I have a command button in the detail section of the continuous form that toggles the field between no and yes whenever the user clicks it. The field for a specific record changes from no to yes (or vice versa) correctly each time the user clicks the button but I cannot get the form to refresh (and show the new value) without manually clicking the refresh button or by selecting refresh all. I have tried a couple of things so far without success including the most obvious (i.e. adding '[Forms]![FormName].Refresh' in the code for the command button click event).
I have even tried putting 'me.refresh' in form events and then either triggering those events or calling that sub from within the command button click event but nothing (other than manually pressing the refresh button) seems to work.
I don't think it is relevant as the controls are all working fine and the fields update when I manually hit refresh but I have got the userform set as a snapshot recordset type as I essentially want the form to be read only.
Despite searching for an answer to this problem, I am completely stumped and would appreciate any help at all.