Martin Caro
mcaro at bigpond.net.au
Wed Jun 30 21:40:20 CDT 2004
Might have a problem there as I'm referencing Integer fields...... Martin ----- Original Message ----- From: "Dave Sharpe" <DaveSharpe2 at cox.net> To: "Access Developers discussion and problem solving" <accessd at databaseadvisors.com> Sent: Thursday, July 01, 2004 12:17 PM Subject: Re: [AccessD] SQL ANDs > Martin - forms aren't My strong point, but what about > the following syntax. > > Dave > > > if IsNull(Forms!frm!txtBox1)then Forms!frm!txtBox1 else "*" > > > > ----- Original Message ----- > From: "Martin Caro" <mcaro at bigpond.net.au> > To: "Access Developers discussion and problem solving" > <accessd at databaseadvisors.com> > Sent: Wednesday, June 30, 2004 10:07 PM > Subject: Re: [AccessD] SQL ANDs > > > Thanks for the suggestion Stephen but I tried inserting that syntax as > criteria for each field but with no luck, it looked promising. Even when I > tried just IsNull(Forms!frm!txtBox1) I got zero records when txtBox1 was > empty. > > Any other thoughts? > > Martin > > ----- Original Message ----- > From: "Stephen Bond" <stephen at bondsoftware.co.nz> > To: "Access Developers discussion and problem solving" > <accessd at databaseadvisors.com> > Sent: Thursday, July 01, 2004 11:27 AM > Subject: RE: [AccessD] SQL ANDs > > > > How about ... > > > > WHERE > > (fld1 = Forms!frm!txtBox1 OR IsNull(Forms!frm!txtBox1)) > > AND > > (fld2 = Forms!frm!txtBox2 OR IsNull(Forms!frm!txtBox2)) > > AND ... etc > > > > Stephen Bond > > > > > -----Original Message----- > > > From: Martin Caro [mailto:mcaro at bigpond.net.au] > > > Sent: Thursday, 1 July 2004 10:30 a.m. > > > To: Access Developers discussion and problem solving > > > Subject: [AccessD] SQL ANDs > > > > > > > > > Hi Folks > > > > > > I have a report query that has a WHERE followered by one or a > > > number of ANDs. The components of the ANDs reference text > > > boxes on a form each of which may or may not be populated. > > > How can I get it to negate one or a number of the ANDs if the > > > target box is Null? At the moment if any one of the AND > > > components is Null no records are returned. I've played > > > around with IIF to test each box first but no luck so far.... > > > > > > Thanks > > > > > > Martin > > > -- > > > _______________________________________________ > > > AccessD mailing list > > > AccessD at databaseadvisors.com > > > http://databaseadvisors.com/mailman/listinfo/accessd > > > Website: http://www.databaseadvisors.com > > > > > -- > > _______________________________________________ > > AccessD mailing list > > AccessD at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/accessd > > Website: http://www.databaseadvisors.com > > -- > _______________________________________________ > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > -- > _______________________________________________ > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com