Hi everyone,
I was soo happy because I had finally figured out a way to manipulate the data from my database onto the report - but as soon as I finished typing in my switch statement, i got an error message stating that the string exceeded character limit for that property.
Where do I place the switch code within the VBA Editor? Do I just create a general function and call it in the control source of the text box that I want the result displayed in? Do I need to pass a variable?
Here's the logic behind what I need:
and so on (for a total of 12 periods)...
Sandy
I was soo happy because I had finally figured out a way to manipulate the data from my database onto the report - but as soon as I finished typing in my switch statement, i got an error message stating that the string exceeded character limit for that property.
Where do I place the switch code within the VBA Editor? Do I just create a general function and call it in the control source of the text box that I want the result displayed in? Do I need to pass a variable?
Here's the logic behind what I need:
Code:
If currentPeriod=02 then
dlookup("[QtySoldPeriod1]","Table1","[year]= txtCurrYr and [whseCode] = txtWhseCode")
BREAK
if currentPeriod=03 then
dlookup("[QtySoldPeriod2]",".....
BREAK
if currentPeriod=04 then ....
dlookup("[QtySoldPeriod3]","......
Sandy