boris
Posts: 14
|
| Posted: 08/03/2006, 6:45 PM |
|
Hi,
I have an include file which queries a database and displays the last 5 records.
<!-- BEGIN Grid LithoOffers -->
<h2>Latest 5 offers:</h2>
<table summary="Latest litho offers" class="indent">
<!-- BEGIN Row -->
<tr><td>{Age} {Manufacturer} {Model}</td></tr>
<!-- END Row --></table>
<p class="small readmore"><a href="#">More »</a></p>
<!-- END Grid LithoOffers -->
This file is included in another page but i want to hide it completely if it dosn't contain any records.
Can someone please help me?
|
 |
 |
Maybe
|
| Posted: 08/03/2006, 8:11 PM |
|
In a before show use:
If yourGrid.Recordset.EOF Then
yourGrid.Visible = False
Else
yourGrid.Visible = True
End If
|
|
|
 |
Maybe
|
| Posted: 08/03/2006, 8:14 PM |
|
Also you will have to use:
inludeFileName.yourGrid.....
|
|
|
 |
boris
Posts: 14
|
| Posted: 08/03/2006, 8:28 PM |
|
Thanks for the reply.
I put the routine in the include page Grid's Before Show and it works a treat.
Thanks!
|
 |
 |
|