Show MsgBox when no data in Data Access Page?

G

Guest

How can I show a message box that tells the user when there is no data in the
recordset of a data access page? I know that you can create an expression on
a report for NoData, but I can't seen to figure it out for a DAP. Please
help me!!!!
 
K

Ken Snell \(MVP\)

You can use the DataPageComplete event of the MSODCS object to do this, I
believe.


<SCRIPT language=vbscript event=DataPageComplete(DSCEventInfo) for=MSODSC>
<!--
dim cto
cto=DSCEventInfo.DataPage.Recordset.RecordCount
If cto=0 Then msgbox "There are no records."
-->
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top