I have recently converted a database built in Access 97 to Access 2010. In 2010 I am now having a problem with an control on the form. The control now states #Name? as the shown value. I have the text box Control source set as:
myShop = Variable from vb
myDate = Variable from vb
RN = Table value
Removed_Date = Table value
Executed = Table value
Can anyone tell me why this is not working. I have been back and forth and can not find a problem with the dcount function. This method works just fine in 97.
Thank you in advance for the help.
Code:
= DCount("[RN]","tbl_DIC","[Location] = '" & [myShop] & "' AND [Removed_Date] > #" & DateAdd("h",-24,[myDate]) & "# and [Removed_Date] <= #" & [myDate] & "# and [Executed] ")
myDate = Variable from vb
RN = Table value
Removed_Date = Table value
Executed = Table value
Can anyone tell me why this is not working. I have been back and forth and can not find a problem with the dcount function. This method works just fine in 97.
Thank you in advance for the help.
Comment