Delete Query

fulltime

Registered User.
Local time
Today, 23:20
Joined
Mar 24, 2006
Messages
56
Hi all.

Below are the info tat i am providing so that u can advice me on how to solve this problem of mine.

Table name = ImageTable
Fields = 1. Code
2. Pic

I want to pop up a MsgBox If the table is empty, i.e. there are no records in the table. How can i achieve that? Thks..
 
Something like this in the form_load function ...

Dim rstRecords As DAO.RecordSet

Set rstRecords = CurrentDb.OpenRecordset("select count(*) from ImageTable")

If rstRecords.Fields(0) = 0 Then
MsgBox "There are no records"
Else
MsgBox "There is at least one record"
End If
 
okies, thks. i will try it out
 

Users who are viewing this thread

Back
Top Bottom