Results 1 to 2 of 2
  1. #1
    3 Star Lounger
    Join Date
    Jul 2002
    Cedar Falls, Iowa, USA
    Thanked 0 Times in 0 Posts

    2 modules, 1 OnLoad property (A2002)

    <P ID="edit" class=small>(Edited by ppem on 05-Dec-03 14:03. )</P>One of my forms needs to access two different modules when it loads. Both of these modules are ones I have imported into my database. One is a add-in which creates the following in the form's OnLoad property: =aadInitialiseSmartForm([Form]). The second reference needs to be to a NotInList module that requires the following in the OnLoad property: =acbCheckOpenArgs([Form]).

    This is the first time I've needed to use them together on the same form and I am not having any luck finding out how to do that in the reference material I'm looking at. Can anyone help me out here?

    Running into a similar problem when I need to create an OnCurrent event to a form but the OnCurrent property is already referring to a basModule.


  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Thanked 31 Times in 31 Posts

    Re: 2 modules, 1 OnLoad property (A2002)


    You can solve this as follows:
    - Clear the form's On Load property
    - Select Event Procedure from the dropdown list of the On Load event
    - Click the builder button (the three dots ... to the right of the dropdown arrow.)
    - The Visual Basic Editor will be activated.
    - Complete the event procedure to look as follows:

    Private Sub Form_Load()
    aadInitialiseSmartForm Me
    acbCheckOpenArgs Me
    End Sub

    In an expression, you refer to the form itself as [Form], but in VBA, you use Me for this purpose. You can handle the On Current event in a similar way.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts