Advertisement
stevennathaniel

MS Access VBA DAO : Test Koneksi Ke Database

Mar 14th, 2016
290
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Option Compare Database
  2.  
  3. Public Sub VBADAO()
  4.  
  5. Dim DAM As String
  6.  
  7. Dim db As DAO.Database
  8.  
  9. Dim rst  As DAO.Recordset
  10.  
  11. Dim query As String
  12.  
  13. DAM = "VBA DAO"
  14.  
  15. 'Open pointer to current database
  16.  
  17. Set db = CurrentDb()
  18.  
  19. Debug.Print DAM & ": Sucessfully connected to database. Data source name: " & vbNewLine & " "; db.Name
  20.  
  21.  
  22. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement