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:
ctrl.Properties("Name") = "ComboSelectTemplate" ctrl.Properties("OnClick") = "MacroComboSelectTemplate.OnClick" ctrl.Properties("RowSourceType") = "Table/Query" 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?




Reply With Quote