[AccessD] Number of records in a form

jwcolby jwcolby at colbyconsulting.com
Mon Sep 14 11:09:56 CDT 2009


Max,

He does specify "the table linked to the form" but IMHO it is better to go directly to the form to 
find out if it is pulling any records.  There may be records in the table but none pulled by the form.

John W. Colby
www.ColbyConsulting.com


Max Wanadoo wrote:
> Loads of ways, Dale
> 
> One simple way is:
> 
> If dcount("*","MyTable") = 0 then
> Msgbox "OMG where have the records gone"
> Else
> Msgbox "Phew, here they are"
> Endif
> 
> Max
> 
> 
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Dale Kalsow
> Sent: 14 September 2009 16:02
> To: Access Developers discussion and problem solving
> Subject: [AccessD] Number of records in a form
> 
> Good Morning Everyone,
>  
> I am trying to figure out if when a form opens if there are any records in
> the table that is linked to the form.  If not then I want to display a
> special text box. 
>  
> Does anyone know how to tell if the table is empty?
>  
> Thanks!
>  
> Dale
> 
> 
>       



More information about the AccessD mailing list