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

Using textbox value in a report DSUM

P: 1
Hi

I have a report that has loads of textboxes that calculate things based on the value on another textbox in the report. I have put a hidden textbox on my report that gets its value from an inputbox when the report opens. I then want to use the value inputted in a DSUM calculation on the same form.

The hidden textbox is called tbHolddate, its control source is:
=InputBox([Please insert date])

The textbox that calculates a value using a DSUM control source is:
=DSum("[Man Value]","Actual Data 2","[Sector]='IB' and [Date]>" & [tbholddate])

The error I get is #NAME

When I hard code a date into the DSUM formula it works fine, for example:
=DSum("[Man Value]","Actual Data 2","[Sector]='IB' and [Date]>#01/06/2006#")

Any help would be much appreciated.

Thanks

Dan
Jun 7 '07 #1
Share this Question
Share on Google+
1 Reply


MSeda
Expert 100+
P: 159
I think it just the syntax, you have to treat a date the same whether its hardcoded or referenced. Try:
Expand|Select|Wrap|Line Numbers
  1. =DSum("[Man Value]","Actual Data 2","[Sector]='IB' and [Date]> #" & [tbholddate] & "#")
  2.  
Jun 14 '07 #2

Post your reply

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