Hi
- one unbound continuous form (form1)
- one recordset (via DAO)
- 2 fields: NAP and DateNAP ()
Onload i only get one record (the last one) from the recordset (=10).
How can i pull all the records into the form.
code--
Private Sub Form_Load()
Dim rst As DAO.Recordset
Dim strSQL As String
Dim dbs As Database
Set dbs = CurrentDb
strSQL = "Select N_APagamento, Data_APagamento, ID_Programa, ID_Medida FROM AUT_PAGAMENTO WHERE ID_Programa = '26'"
Set rst = dbs.OpenRecordset(strSQL)
Do While Not rst.EOF
NAP = rst!N_APagamento
Data_NAP = rst!Data_APagamento
rst.MoveNext
Loop
rst.Close
Set rst = Nothing
dbs.Close
End Sub
---
Thanks
- one unbound continuous form (form1)
- one recordset (via DAO)
- 2 fields: NAP and DateNAP ()
Onload i only get one record (the last one) from the recordset (=10).
How can i pull all the records into the form.
code--
Private Sub Form_Load()
Dim rst As DAO.Recordset
Dim strSQL As String
Dim dbs As Database
Set dbs = CurrentDb
strSQL = "Select N_APagamento, Data_APagamento, ID_Programa, ID_Medida FROM AUT_PAGAMENTO WHERE ID_Programa = '26'"
Set rst = dbs.OpenRecordset(strSQL)
Do While Not rst.EOF
NAP = rst!N_APagamento
Data_NAP = rst!Data_APagamento
rst.MoveNext
Loop
rst.Close
Set rst = Nothing
dbs.Close
End Sub
---
Thanks