I apologize if this has been answered, but I really don't have the time to search thoroughly right now. Partially because I'm doing it for work. And I'm asking from my phone so I can't screenshot, etc.
I've got a database built in Access 2016 and am having an issue.
I have a form that updates a table based on whats entered and I'd like to see whether or not anything was actually updated in the table without opening the query and scrolling through the results.
I have a macro set up to run when the 'update' button is clicked, which runs a different query based on the value for a specific field. I.E. "if field = 6, runquery update6"
I wrote a function in the VBA thing called RecordsChanged that is literally just
[ AffectedRows = CurrentDb.RecordsAffected MsgBox CStr(AffectedRows) & " records changed" ]
Which I got from here: How to show how many records were updated by an update query?
To quit rambling, the message box displays but always says 0 records changed even if there was one changed. I have a RunCode action at the end of the macro hooked into the button on the form that calls RecordsChanged.
Can anyone give me advice or an explanation?