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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automatically shut down a form with no records

Status
Not open for further replies.

trystanhuwwilliams

Programmer
Aug 23, 2002
39
0
0
GB
I've successfully created a form to enter report criteria - which opens another form displaying all the records matching the criteria. I want tp know how to automatically close the form if there aren't any records to display with the message 'No Records To Display',


trystan
 
before activating form:
if {ActiveDocument.Sections["myResultSection"].RowCount ==0) {
Alert("Yo...Sorry No Records Found")
}
else {
ActiveDocument.Section["MySecondForm"].Activate()
Blah
Blah...
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top