troubleshooting Question

MS Access VBA events question

Avatar of Anton Fernando
Anton Fernando asked on
Microsoft AccessVBA* MS Access VBA Events
2 Comments1 Solution14 ViewsLast Modified:
I have a form linked via a query to a table. People can update the table by entering data through the form. I am wanting to detect when a record (containing several fields) is changed - either by 1 or more fields being changed/updated. I want to acknowledge the fact a change has been made (by updating a field called RecChange ) in the table driving the data behind the form. I have used a field level "On Update" to increment a public variable RecChangeCount (+1) value to give a total of the changes.This function has been put on each of the form fields so that each field can cause an incremention indepentdently . I now want to move that number to the RecChange field on the table I tried using the form level "On Update" to do a me.RecChange.value=RecChangeCount as I thought being that it was at form level it would look at the fact I had left the record to move to the next record to trigger me.RecChange.value=RecChangeCount. The value is moving across but the form now seems to lock on current record preventing moving to the next one. Looking closely I am getting error message 2950 argument 97. There is a macro triggered when  a field level update happens. This macro runs a VBA function RecChangeCount=RecChangeCount +1. When I remove me.RecChange.value=RecChangeCount from my form level update statement, I can move between records again but there is no data written to the RecCount field.Is there a clash between form level and field level update events. The error message implies it don't like my run code/function in the macro?  
       

ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros