Rabu, 25 Juli 2012

Re: [MS_AccessPros] Do not display a form if the control source (a query) return no rows

 

Thomas

Not sure if this would work but try this

Put a text box on the main form with something like 
=DCount("*","[Name Of Table]")

Then in the open event or load or something put an if statement that would check the count on the text box if it is 0 then cancel the open event. 

This off the top of my head and I am no where near an expert. 
 
Jim Wagner
________________________________

________________________________
From: Thomas <thomas_lam_us@yahoo.com>
To: MS_Access_Professionals@yahoogroups.com
Sent: Wednesday, July 25, 2012 10:16 AM
Subject: Re: [MS_AccessPros] Do not display a form if the control source (a query) return no rows


 
Hi Crystal,

So I still have to check if there is something to be displayed on the form and then do something.

There is no quick and easy way of checking if zero row is return or something like that.

Regards,
Thomas

--- In MS_Access_Professionals@yahoogroups.com, Crystal <strive4peace2008@...> wrote:
>
> Hi Thomas,
>
> the Form OPEN Event has Cancel
>
> Warm Regards,
> Crystal
>
> Learn Access on YouTube
> http://www.YouTube.com/LearnAccessByCrystal
>
>
>  *
>    (: have an awesome day :)
>  *
>
>
>
> ________________________________
> From: Thomas <thomas_lam_us@...>
> To: MS_Access_Professionals@yahoogroups.com
> Sent: Tuesday, July 24, 2012 5:40 PM
> Subject: [MS_AccessPros] Do not display a form if the control source (a query) return no rows
>
> What is the event which will be fired under this condition? Can I display a message box and then issue the CANCEL = TRUE to suppress the form from displaying?
>
> Regards,
> Thomas
>
>
>
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>
>
>
> [Non-text portions of this message have been removed]
>

[Non-text portions of this message have been removed]

__._,_.___
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar