Hello Access Gods...
I am writing a bit of VBA code with the aim of allowing a user to easily add fields to a search form. I have a table with Category / Control_Name columns, which the VBA goes through item by item and creates a control for each one. I am able to create the controls just fine, but would like to re-name them to something more user-friendly than Combo0, Combo2, Combo4 etc.
Is there an "object name" property that can be set when creating a control? (As in, when I call the CreateControl function?)
If not, can someone recommend a way to reference the equivalent of:
[Forms]![Form1]!["Combo" & variable_name].Name = "strNewName " ?
This would be enough for me because when it creates the controls it will always be an even number starting with 0, so I can simply iterate by 2 within a loop to re-name each control.
Thanks in advance!
I am writing a bit of VBA code with the aim of allowing a user to easily add fields to a search form. I have a table with Category / Control_Name columns, which the VBA goes through item by item and creates a control for each one. I am able to create the controls just fine, but would like to re-name them to something more user-friendly than Combo0, Combo2, Combo4 etc.
Is there an "object name" property that can be set when creating a control? (As in, when I call the CreateControl function?)
If not, can someone recommend a way to reference the equivalent of:
[Forms]![Form1]!["Combo" & variable_name].Name = "strNewName " ?
This would be enough for me because when it creates the controls it will always be an even number starting with 0, so I can simply iterate by 2 within a loop to re-name each control.
Thanks in advance!
Comment