Hey guys, can anyone help me with a simple question. I have this SQL statement below in a sub in VB within access from a button click, and I am new to this.
Here is what I typed:
Private Sub Command0_Click()
  Dim rs As Recordset
  Dim sql As String
  Dim db As Database
  Set db = CurrentDb
  sql = "SELECT * FROM Transactions"
  Set rs = db.OpenRecordset(sql)
  Do Until rs.EOF
    rs.MoveNext
  Loop
  If Not rs.EOF Then
    MsgBox "test"
  End If
End Sub
Ok, so how do I populate this?? Essentially I am justing starting out with this, so I am wondering how do I take this simple code, and run it like a query so that the resulting recordset opens.
Thanks!