Hi,
I am very new to Access VBA, but I'm trying to change a line of code in a macro so that it's more dynamic:
Basically, I'm adding 'names' to a table every so often, but currently I'd have to physically amend this line of code to accomodate each new one.
What I want is a simple query that returns a list of all the names present, and then for VBA to pick up that list as the array.
Hope this makes sense!
I am very new to Access VBA, but I'm trying to change a line of code in a macro so that it's more dynamic:
Code:
Data = Array("Name1", "Name2", "Name3", "Name4", "Name5", "Name6", "Name7", "Name8")
Basically, I'm adding 'names' to a table every so often, but currently I'd have to physically amend this line of code to accomodate each new one.
What I want is a simple query that returns a list of all the names present, and then for VBA to pick up that list as the array.
Hope this makes sense!