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

Using textbox value in a report DSUM

P: 1

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.


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

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] & "#")
Jun 14 '07 #2

Post your reply

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