I am not a programmer, and there are no resources at work to help me with this improvement.
Current code works. It is just longer than it should be.
goal: Write a loop with the source data that needs to have a variable defined is from another table. The process is automated in a
VB script. Currently, it is just one huge file with multiple very common functions. It could be made much more efficient if I used a variable for the query in the FROM clause and variable for the known WHERE clause.
The variable (project name) is unique. the format for the FROM source is:
qry<Project>Data
The format using project name will define the string for the WHERE clause. The syntax is complete for normal SQL. I would assume that I would do something like:
Dim strWhere as String
strWhere = <sql where extract>
A simple explanation of dealing with variables inserted, with the loop or case would be appreciated.
Thanks!