I've been trying to figure out simply how to use SQL in the MS Access's Visual Basic editor, and so far I've literally run into 20 unique errors over the last couple of days. Now, I've finally got a super simplified script that doesn't return any errors, but it doesn't display anything either, and I can't figure out why. Any ideas?
Expand|Select|Wrap|Line Numbers
- Private Sub Command7_Click()
- Dim db As Database
- Dim rs As DAO.Recordset
- Set db = CurrentDb()
- Set rs = db.OpenRecordset("SELECT * FROM Temporary;")
- rs.Close
- db.Close
- Set rs = Nothing
- Set db = Nothing
- End Sub
(It's linked to a form, so that when someone clicks the submit button this code is called).
Thank you!