By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,759 Members | 1,778 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,759 IT Pros & Developers. It's quick & easy.

DSum local variable as criteria

jmoudy77
P: 20
Hi,

I'm trying to use a variable "FirstSemi" as the second criteria in a DSum function. The DSum function is used in the same Form_Load function that the variable was declared. I keep getting an error referencing the variable in the DSum function when the form loads. Any ideas?

And [FltDate] > FirstSemi")

-Josh
Mar 16 '08 #1
Share this Question
Share on Google+
2 Replies


Expert Mod 2.5K+
P: 2,545
Hi,

I'm trying to use a variable "FirstSemi" as the second criteria in a DSum function. The DSum function is used in the same Form_Load function that the variable was declared. I keep getting an error referencing the variable in the DSum function when the form loads. Any ideas?

And [FltDate] > FirstSemi")

-Josh
Hi. It would be better to see the whole DSUM statement, not just the last part of it. Change the And to
Expand|Select|Wrap|Line Numbers
  1. And [FltDate] > #" & FirstSemi & "#")
-Stewart
Mar 16 '08 #2

jmoudy77
P: 20
Thanks Stewart, worked like a charm.

-Josh
Mar 16 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.