Gustav Brock
gustav at cactus.dk
Thu Jun 5 11:12:22 CDT 2003
Hi Charlotte Well, it should - be obvious. Another use of this construction is: .. WHERE True This is useful where you in code build a criteria string: .. WHERE " & strCriteria If no criteria is to be applied, let strCriteria = "True". /gustav > That is true but doesn't seem as obvious to me if someone else were to > examine the design. > Charlotte Foust > -----Original Message----- > From: Gustav Brock [mailto:gustav at cactus.dk] > Sent: Wednesday, June 04, 2003 11:21 PM > To: accessd at databaseadvisors.com > Subject: Re: [AccessD] Dang Bound Forms Again > Hi Charlotte > Instead of inventing a false condition you can just state it: > SELECT * FROM MyTable WHERE False > /gustav >> Oh, you mean nothing in the recordsource, not no records returned by >> it. So don't remove the recordsource, replace it with one that returns >> an empty recordset. The way I do it is to use a standard recordsource >> that returns no records (i.e., "SELECT * FROM MyTable WHERE 1 = 2"). >> That allows your form to be bound to the fields in MyTable but since >> the where condition is always false, it returns an empty recordset. >> Then I use code to set the recordsource to the appropriate one when >> something triggers it such as a choice in a dropdown.