[AccessD] Set form recordsource on Load event without records

pcs at azizaz.com pcs at azizaz.com
Wed Jan 16 19:18:54 CST 2008


I was once told that if you use
WHERE PK IS NULL
then the system won't even bother go fetching the indexes - 
i.e. no hit on the BE

Can anyone confirm?

borge

---- Original message ----
>Date: Wed, 16 Jan 2008 20:01:47 -0500
>From: "Arthur Fuller" <fuller.artful at gmail.com>  
>Subject: Re: [AccessD] Set form recordsource on Load event 
without records  
>To: "Access Developers discussion and problem solving" 
<accessd at databaseadvisors.com>
>
>Assuming that ID is the PK of the table, then choice 1 is a 
very minimal hit
>on the BE, since the index will quickly deduce that no key 
matches. I might
>even adjust the query to PK < 0 (thinking about Colby's and 
others' use of
>the zeroth record).
>
>Arthur
>
>On 1/16/08, Dan Waters <dwaters at usinternet.com> wrote:
>>
>> I have a continuous form that has bound fields in the 
Detail section.
>>
>> On Load, I want the detail section to show no records, 
and not show #Error
>> in the bound fields.
>>
>> I can:
>>
>> 1) 'SELECT X FROM table WHERE ID = 0', but that's a hit 
on the BE.
>>
>> 2) Set Me.Recordsource = "", but then I get #Error.
>>
>> 3) Create a FE table with correct fields and no records, 
but that's
>> another
>>
>>    FE object with only one simple purpose.
>>
>>
>> Is there another way to do this?
>>
>> Thanks!
>> Dan
>>
>> --
>> 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



More information about the AccessD mailing list