Subform autorefreshes when bound to Access table, but not when bound to SQLSvr table

keviny04

New member
Local time
Today, 03:32
Joined
Mar 28, 2018
Messages
5
I have a form set up as shown in the picture below. The subform on the left is bound to a local Access table. The subform on the right is bound to a local SQL Server 2014 Express table. Btw, this database serves no real-world purposes. It is specially made just for me to ask the following empirical question.

If I update the textbox Field1 and click Save, the button's OnClick VBA code will update (via OpenRecordset, Edit, Update, etc.) the value of Field1 in both tables to which the two subforms are bound.

It will also set focus on both forms:

Me!subform1.SetFocus
Me!subform2.SetFocus

For reasons I don't really understand, when subform1 (which is bound to the Access table) gets the focus, it auto-refreshes with the change I made to Field1 earlier.

And here is my question: when subform2 (bound to the SQL Server table) gets the focus, it doesn't auto-refresh likewise; why is that?

And if I try to go into subform2 to edit Field1 directly, I get the error saying the value has been updated by another user, etc.

Does SQL Server has something to do with all this? Is there any way to make subform2 auto-refresh likewise?

R5UOxO4.jpg
 
Crossposted elsewhere, requery already mentioned.
 
Please read the following link.

https://www.excelguru.ca/content.php?184

You're not getting yelled at, it just explains why you shouldn't normally cross-post, and what you should generally do if you feel you have to do it.
 

Users who are viewing this thread

Back
Top Bottom