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

Display "No Record" message on a form

Status
Not open for further replies.

Bagger

Instructor
Jun 18, 2001
23
US
Can someone assist me in creating the code to display a message on a form where there is no record found.
I have a song file 50,000 records.when a search is done and right now the only way I know it is complete and no record is found is the "hourglass" goes away. Thanks in advance for any asiatance.
 
The following is from the help file:

The following example creates a Recordset object based on the Orders table and then determines the number of records in the Recordset object:

Sub CountRecords()
Dim dbs As Database, rst As Recordset

' Return reference to current database.
Set dbs = CurrentDb
' Open table-type Recordset object.
Set rst = dbs.OpenRecordset("Orders")
Debug.Print rst.RecordCount
rst.Close
Set dbs = Nothing
End Sub

You should be able to modify that to pop up a form or un-hide a "No Records Found" Text Label.

Hope that helps... Terry M. Hoey
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top