G
Guest
Hi all,
I have several calculated fields (yeah, well I know it's wrong but anyway) I want to update after the 'Source Controls' changed. Well, one source fields actually updates several fields. So I wrote in the 'AfterUpDate' Event almost 30 lines to update all my calculated fields. Then I copy/pasted over the other After Update Events of my other source fields.
Then I asked myself : can't I wrote that Sub in a Module and just 'Call' it in the AfterUpDate Event ? But I didn't manage ! Access keeps not recognizing my Sub.
What are the points I missed ? Or the procedure I should follow ?
To be more precise, I wrote something like this :
in my txtSourceField1, in the AfterUpdate Event :
form![frm FormName]![txtCalculatedField1]= blah blah 'which worked
then I copy/pasted it to a 'mod General' Module, creating an 'UpdateCalculatedFields' Sub, containing the same code. In the AfterUpdate Event, I put something like :
Call UpdateCalculatedFields() 'which didn't work !
Any Help Would be apreciated !
Nico
I have several calculated fields (yeah, well I know it's wrong but anyway) I want to update after the 'Source Controls' changed. Well, one source fields actually updates several fields. So I wrote in the 'AfterUpDate' Event almost 30 lines to update all my calculated fields. Then I copy/pasted over the other After Update Events of my other source fields.
Then I asked myself : can't I wrote that Sub in a Module and just 'Call' it in the AfterUpDate Event ? But I didn't manage ! Access keeps not recognizing my Sub.
What are the points I missed ? Or the procedure I should follow ?
To be more precise, I wrote something like this :
in my txtSourceField1, in the AfterUpdate Event :
form![frm FormName]![txtCalculatedField1]= blah blah 'which worked
then I copy/pasted it to a 'mod General' Module, creating an 'UpdateCalculatedFields' Sub, containing the same code. In the AfterUpdate Event, I put something like :
Call UpdateCalculatedFields() 'which didn't work !
Any Help Would be apreciated !
Nico