R
Richard
Hi
I am trying to populate a continuous form with data from a recordset. What I
am getting now is only one record.
Appreciate if anyone can modify the code for me.
Thanks in advance
Richard
Code:
Private Sub Form_Load()
Dim DB As DAO.database
Dim rs As DAO.Recordset
Set DB = CurrentDb
Set rs = DB.OpenRecordset("Select A.firstname, A.lastname from wbdata as A")
With rs
If Not (.BOF And .EOF) Then
.MoveFirst
Do Until .EOF
Me.txtFirstname = !FIRSTNAME
Me.txtLastname = !LASTNAME
.MoveNext
Loop
rs.Close
Set rs = Nothing
Set DB = Nothing
End If
End With
End Sub
I am trying to populate a continuous form with data from a recordset. What I
am getting now is only one record.
Appreciate if anyone can modify the code for me.
Thanks in advance
Richard
Code:
Private Sub Form_Load()
Dim DB As DAO.database
Dim rs As DAO.Recordset
Set DB = CurrentDb
Set rs = DB.OpenRecordset("Select A.firstname, A.lastname from wbdata as A")
With rs
If Not (.BOF And .EOF) Then
.MoveFirst
Do Until .EOF
Me.txtFirstname = !FIRSTNAME
Me.txtLastname = !LASTNAME
.MoveNext
Loop
rs.Close
Set rs = Nothing
Set DB = Nothing
End If
End With
End Sub