Free for PREMIUM members
Public Function CheckForRecords()
'Save this function as a module
Dim db As DAO.Database, rs As DAO.Recordset
Dim SQL As String
Set db = CurrentDb()
SQL = "SELECT * FROM Table;" 'Put your SQL code here
Set rs = db.OpenRecordset(SQL)
If .EOF Then
CheckForRecords = "False"
CheckForRecords = "True"
'If you want to do something with the individual records, you can use a loop like this
' While Not .EOF
' Do something with the records here
' End With
Set rs = Nothing
Set db = Nothing
Open in new window
We value your feedback.
Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!
Dim iCount as Integer
For iCount = 0 to Me.ListBox.ListCount -1
' some code
Solve your biggest tech problems alongside global tech experts with 1:1 help.