ppkgoldengun
MIS
Being fairly new at VBA coding I need help getting the following to work (I think my syntax is screwed up).
I need to either do a Dlookup or set a variable equal to a SQL string result.
Scenario.
One variable set to something
Second variable set to something.
Third variable dimensioned to be result.
Lookup in a table a resultant variable by either using Dlookup or SQL with a Greater than first variable clause AND a less than second variable clause. The table is structured so only one result will be returned.
I can get a dlookup to work on a single variable but the multi variable clause has me stumped (probably a quotation mark error).
Any examples or psuedo code? Would SQL or Dlookup be faster as I must use a three lookups (to different tables) within looping through a record set.
Many thanks from this newbie.
I need to either do a Dlookup or set a variable equal to a SQL string result.
Scenario.
One variable set to something
Second variable set to something.
Third variable dimensioned to be result.
Lookup in a table a resultant variable by either using Dlookup or SQL with a Greater than first variable clause AND a less than second variable clause. The table is structured so only one result will be returned.
I can get a dlookup to work on a single variable but the multi variable clause has me stumped (probably a quotation mark error).
Any examples or psuedo code? Would SQL or Dlookup be faster as I must use a three lookups (to different tables) within looping through a record set.
Many thanks from this newbie.