Advertisement
stevennathaniel

VBA MS Access : Memeriksa Keberadaan Recordset dan Record

Mar 16th, 2016
326
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Option Compare Database
  2.  
  3. Private Sub Command17_Click()
  4.  
  5. Dim rs As DAO.Recordset
  6.  
  7. Dim db As Database
  8.  
  9. Set db = CurrentDb
  10.  
  11. Set rs = CurrentDb.OpenRecordset("dataUsia")
  12.  
  13. If rs.RecordCount <> 0 Then
  14.  
  15. Debug.Print "ada records"
  16.  
  17. End If
  18.  
  19. If (rs.EOF = False) Or (rs.BOF = False) Then
  20.  
  21. Debug.Print "ada recordset"
  22.  
  23. End If
  24.  
  25.  
  26. rs.Close
  27.  
  28. Set rs = Nothing
  29.  
  30. Set db = Nothing
  31.  
  32.  
  33. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement