I've run into a bit of a strange issue on my database I am building for my job. I made a report that lists all of the jobs a specific item is ordered from and in the footer of the report I have the total inventory (TotalInventory) and another that is the sum of the orders using the sum function (renamed TotalOrders) and have below it a text box with a control source of =[TotalInventory]-[TotalOrders]. When I first set it up it worked and calculated no problem butt as soon as I closed and rebooted the database it gives me a #Name? error in the textbox instead that is only fixed by deleting and reentering the information but as soon as I close my database and reopen it the same error pops up again. I've tried googling this but I have not had any luck finding any solutions to this.
Scott Axton
@Reply 3 years ago
#Name? Can be a spelling error in your field name. Access can't find that field you are specifying.
Another possibility could be a timing issue. Depending on the complexity of your report you might be trying to get data prior to it being loaded into the form or report.
I would check out your field names first for spelling. If that doesn't fix it you may need to post some screen shots for us, using dummy data as well as show us in Design Mode what you are doing.
Kevin Yip
@Reply 3 years ago
As Scott says, the reason for the error is that the names [TotalInventory] and/or [TotalOrders] are unknown to Access at some point. Try using names that are guaranteed to be known, such as the bound field names in the report. Instead of writing [TotalInventory]-[TotalOrders], try Sum([BoundField1])-Sum([BoundField2]) instead
Sorry, only students may add comments.
Click here for more
information on how you can set up an account.
If you are a Visitor, go ahead and post your reply as a
new comment, and we'll move it here for you
once it's approved. Be sure to use the same name and email address.
This thread is now CLOSED. If you wish to comment, start a NEW discussion in
Visitor Forum.