SoxPats83
07-28-2010, 02:21 PM
Hi all, i have a report i am running with hundreds of text boxes in it with their sole purpose to calculate totals. i have all the formulas typed correctly and everything works great. the problem i have here is that when i am finished with the report and close out my DB, the next time i open it many of the text boxes have "#Name?" as their value. it's not until i go into design view, remove the Record Source and add back the SAME Record Source and then go into view, that the correct numbers come back.
For the record, the Record Source is a query i have that queries a table of thousands of records that are broken up by dates. each date could contain hundreds of records. the query qill prompt the user to type in a date and thus filtering the query to show on the records from the chosen date.
any help would be appreciated. thanks!
SoxPats83
07-28-2010, 04:12 PM
i know this is kind of a crazy scenario...
sadly i have a deadline on this, so if anyone has any ideas, i would hugely appreciate it. happy to add to reputation...
vbaInet
07-28-2010, 04:22 PM
Have you tried recreating the report? Does it happen to all calculated textboxes?
SoxPats83
07-28-2010, 04:24 PM
Have you tried recreating the report? Does it happen to all calculated textboxes?
I have and yes.
vbaInet
07-28-2010, 04:24 PM
Show me a typical calculation.
SoxPats83
07-28-2010, 04:25 PM
Have you tried recreating the report? Does it happen to all calculated textboxes?
if i copy all fields and paster them into a form though this problem does not happen....
but i cannot do the sendobject macro from the report as it with send every record and i only won't the current record to be sent as the attachment.
SoxPats83
07-28-2010, 04:25 PM
Show me a typical calculation.
=[Text87]+[Text90]+[Text92]
hope this helps
vbaInet
07-28-2010, 04:26 PM
if i copy all fields and paster them into a form though this problem does not happen....
but i cannot do the sendobject macro from the report as it with send every record and i only won't the current record to be sent as the attachment.You can limit your report to any record when it's opened by using the WHERE argument of the OpenReport method.
SoxPats83
07-28-2010, 04:27 PM
You can limit your report to any record when it's opened by using the WHERE argument of the OpenReport method.
i'm sorry, when i said every record, that is when i do it from a form, not report. typo on my part.
vbaInet
07-28-2010, 04:30 PM
Why don't you give the textboxes a meaningful name? Don't worry about that for now.
Are these textboxes (i.e.Text87, 90 and 92) bound?
SoxPats83
07-28-2010, 06:07 PM
Why don't you give the textboxes a meaningful name? Don't worry about that for now.
Are these textboxes (i.e.Text87, 90 and 92) bound?
they are not bound. in regards to giving the text boxes meaningful names, i have other text boxes within the form that formulates other text boxes that have meaningful names and i am getting the same result.
vbaInet
07-28-2010, 06:12 PM
I just mentioned the meaningful name thing to ensure you're following good design practice, nothing to do with your current problem :)
So instead of using the textbox names use the field names instead.
Also, what are the datatypes of these fields?
SoxPats83
07-28-2010, 06:22 PM
I just mentioned the meaningful name thing to ensure you're following good design practice, nothing to do with your current problem :)
So instead of using the textbox names use the field names instead.
Also, what are the datatypes of these fields?
well, the thing is a lot of these unbound text boxes are referencing text boxes that are bound to a field that a user has inputted numbers. for example an unbound text box may be referencing a bound text box that has 1, 1, 2, 3, 0, 1 in it's records. the formula in the unbound text box is for a sum, thus returning 8. that works fine. but when i got three unbound text boxes that work fine, i then need to add those three up and return the result in yet another unbound text box. that is where the error happens.
is it possible i am getting this error because the formula is referencing unbound controls, as opposed to bound?
vbaInet
07-28-2010, 06:30 PM
I am not sure yet. Let's see a stripped down version of your db.