[AccessD] Dang Bound Forms Again

Charlotte Foust cfoust at infostatsystems.com
Thu Jun 5 15:42:17 CDT 2003


That may indeed be it.

Charlotte Foust

-----Original Message-----
From: Gustav Brock [mailto:gustav at cactus.dk] 
Sent: Thursday, June 05, 2003 9:48 AM
To: accessd at databaseadvisors.com
Subject: Re: [AccessD] Dang Bound Forms Again


Hi Charlotte

Jet 3.5 was optimized for this construction - meaning that Access 2.0
was not - perhaps that is what you are thinking of:

  http://www.microsoft.com/accessdev/articles/perfover.htm

/gustav


> Way back in the dim reaches of Access (like maybe Access 2.0), someone

> like Ken Getz or one of the other gurus had a reason he gave for not 
> using that construction, so I never got in the habit of it.

> Charlotte Foust

> -----Original Message-----
> From: Gustav Brock [mailto:gustav at cactus.dk]
> Sent: Thursday, June 05, 2003 8:12 AM
> To: accessd at databaseadvisors.com
> Subject: Re: [AccessD] Dang Bound Forms Again


> 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.

_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com


More information about the AccessD mailing list