AXL
AXL

Reputation: 31

How to call an afterupdate event from another module/control event (MS ACCESS VBA)

I have been using Microsoft access for a while however i seem to be having some difficulty with a single line of code. i know it is possible to trigger a form controls event from another module or event as i have done before in VBA for excel, however when i try to do this in MS Access it gives me a runtime error any and all help would be appreciated in this matter as I'm sure there is probably something very basic that I'm missing here.

Please see below code for easy reference.

 Forms("Insert_Data_Others").CMBVoy_ID_Oths.AfterUpdate
        
            Call CMBVoy_ID_Oths_AfterUpdate

Upvotes: 2

Views: 2003

Answers (1)

June7
June7

Reputation: 21379

Make sure procedure is not declared as Private.

Use underscore in place of the last period.

Forms("Insert_Data_Others").CMBVoy_ID_Oths_AfterUpdate

or this version which will show the event in intellisense tips.

Form_Insert_Data_Others.CMBVoy_ID_Oths_AfterUpdate

Upvotes: 1

Related Questions