Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

record count() simple doubt

Status
Not open for further replies.

proggy

Programmer
Apr 21, 2002
46
US
I have a report to be shown and I want a message box to pop up and say no records when there are no records in the underlying query of the report.. can anyone help me with this..
If I have to use rst.open......() then where i have to write this part of code..
thanks,
 
There is an OnNoData event on the report. Put your msgbox code in this event.

In the OnOpen event you can equate the rst.open to the recordsource. Instead of the open method use the execute method of the rst object. You can also use a command object in ADO instead of the recordset object. Check out the syntax in help.

me.recordsource = rst.execute
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top