Results 1 to 5 of 5

Thread: Replace OnClick Macro with VBA Code [solved]

Threaded View

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jul 2004
    Posts
    29

    Resolved Replace OnClick Macro with VBA Code [solved]

    Hello there!

    I have the following problem:
    I create a form with VBA (because the fields in the form are different each time the form is opened).

    Also I create a control (Combobox), in which the user can select a socalled Template. After selecting a value in the combobox some fields in the form shall be filled (=execute a codesequence after raising the OnClick event).

    At the moment i use this:

    VB Code:
    1. ctrl.Properties("Name") = "ComboSelectTemplate"
    2. ctrl.Properties("OnClick") = "MacroComboSelectTemplate.OnClick"
    3. ctrl.Properties("RowSourceType") = "Table/Query"
    4. ctrl.Properties("RowSource") = "SELECT [" & Templates & "].[TemplateName] FROM [" & Templates & "]"

    I have created a macro "MacroComboSelectTemplate" that then executes a VBA procedure.

    Now I want to remove the macro-workaround and replace it by VBA code.

    Anyone has an idea?
    Last edited by Clywd; Feb 11th, 2005 at 10:46 AM. Reason: [Solved]

Posting Permissions

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



Click Here to Expand Forum to Full Width