hello everyone
in access, how can i view the results of an sql select query in a textbox or in a flexgrid
and how i can execute the query from the vba code page?
aymun
Printable View
hello everyone
in access, how can i view the results of an sql select query in a textbox or in a flexgrid
and how i can execute the query from the vba code page?
aymun
VB Code:
Dim strSQL as String Dim db as DAO.Database Dim rs as DAO.Recordset strSQL = "SELECT * FROM tblFoo WHERE fldID = 1" Set db = CurrentDB Set rs = db.OpenRecordset(strSQL) If rs.Recordcount > 0 Then rs.MoveFirst txtFoo.Text = rs!fldID End If