Doug Murphy
dw-murphy at cox.net
Tue Aug 21 16:54:38 CDT 2007
Hi Susan, The query just uses the value in one field on the form as its criteria. I tried rebuilding it and importing all the objects into a new database, but still get the same error message. To answer your question it appears, based on the error message that Jet can't resolve the form object, text box in this case, to get its value. The interesting thing is that what ever vba uses to get the value works in the Immediate window. Very frustrating. Doug -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Susan Harkins Sent: Tuesday, August 21, 2007 2:39 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Query Criteria problem That doesn't really help him tonight Arthur! ;) Doug, I can't remember -- does the query run on its own and the form screws it up? Which object is really causing the problem - the query or the form? I had this happen with a form/subform once -- it was corrupted and I had to rebuild it from scratch. I hope you find a simpler solution. Susan H. JC and I are on about this from time to time. My preferred approach is static functions, JC's is a class. Either way, free yourself from dependency on the form. Search the archive for "static functions" or "classes" and learn how to break free of dependence upon forms. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com