I am using some code converted from: http://www.tek-tips.com/faqs.cfm?spi...d=703&sfid=760 to print a "report" to MS Word. I set it up on an offline copy of my database and it works great. Once I copied my Code and Queries over to the online version, I get a 'Run Time Error 3464 / Data Type Mismatch in Criterial Expression'.

The cause is this: the table i query has a key field of type TEXT which I had changed to AUTONUMBER in the online version. I made a copy of the online version, changed the TYPE back to TEXT, and the Code worked fine. The variable "Public strProdNum As String" declared in the Module pulls data from this field durring the ONCLICK proceedure like this: "strProdNum = Me.PartsID". When i go to debug after the error occurs it highlights this line in my code: "Set recSubmittal = db.OpenRecordset(strSQL"


I want to keep the Autonumber Feature, but I Also need this code to work. How can I fix this? Sorry to bounce you back and forth to the above code - Hope this makes sence!!

Thanks