Re: Display 'No Records Found'



: The DAP I made, runs the query when the page is opened (no button), The
: query basically just lists any records with the current day's date. I
: based the page off a query in access, would it be better to have the
: filter be part of the VBscript like you did (so I can get the 'no
: records found' message)?
:
: Here is the query I used in access
:
: SELECT tblSchedule.SchedDate, tblSchedule.Employee_Name,
: tblSchedule.Exception
: FROM tblSchedule
: WHERE (((tblSchedule.SchedDate)=Date()));
:
: How would I achieve the same results with VBscript? If it's even
: possible?
:
: Thanks
: Chris.

The example I showed uses a text box and a search button so the current data
set can be filtered by the search text entered. If you are using a query to
create your dap, then you can just check the record count when finished
loading. Try something like this

<SCRIPT language=vbscript event=DataPageComplete(oEventInfo) for=MSODSC>
<!--
if oEventInfo.DataPage.Recordset.RecordCount = 0 then
msgbox "No Matches Found"
end if
-->
</SCRIPT>


.