Hi. I have this (hopefully) easy to solve question which has been bothering me for some time now. I usually work my way around it, but would like to have an actual solution for it.
So now and then I need to reference an object whose name is stored in a varaiable. As example, say I have a listbox whose name is stored in strListboxName. How can I change it's recordset? Is there a general way to reverence objects through a variable holding their name?
I know that you can reference a form by forms(strFormName), but there is no lists(strListName) or labels(strLabelName)... In my opinion there should be a way to access anything through their name, even a string: strings(strStringName). My main expertise lays within PHP and it is very doable there~
Thanks in advance for any help.
PS. I'm using Access 2007 VBA
So now and then I need to reference an object whose name is stored in a varaiable. As example, say I have a listbox whose name is stored in strListboxName. How can I change it's recordset? Is there a general way to reverence objects through a variable holding their name?
I know that you can reference a form by forms(strFormName), but there is no lists(strListName) or labels(strLabelName)... In my opinion there should be a way to access anything through their name, even a string: strings(strStringName). My main expertise lays within PHP and it is very doable there~
Thanks in advance for any help.
PS. I'm using Access 2007 VBA