Hello all,
I have a form, called "frmmain." In this form is a subform called "subBills." The subform has a default view of continuous forms.
The database program I am attempting to create using a few different external databases, all created in Access. So far, I have been able to connect to each and get the data that I wish to. However, when I try to get the data for the continuous subform, I only end up with the last record in the recordset.
Here's my code so far(I've skipped the connection process because I didn't think it was relevant).
Call GetConnection
rs.Open "tblBills", cn
rs.MoveFirst
Set f = Forms!frmMain!subBills.Form
Set f.Recordset = rs
Do Until rs.EOF
f("Date") = rs!duedate
f("Payee") = rs!Payee
f("MinDue") = rs!MinDue
f("Web") = rs!Web
f("Paid") = rs!Paid
f("Status") = rs!Status
rs.MoveNext
Loop
I've put breaks in and tried to debug, and I am getting the data I need with each loop. But, again, I am only getting the data from the last loop.
Does anybody know how (or if) I can make the form show all the records?
Thanks in advance,
mrmetal
I have a form, called "frmmain." In this form is a subform called "subBills." The subform has a default view of continuous forms.
The database program I am attempting to create using a few different external databases, all created in Access. So far, I have been able to connect to each and get the data that I wish to. However, when I try to get the data for the continuous subform, I only end up with the last record in the recordset.
Here's my code so far(I've skipped the connection process because I didn't think it was relevant).
Call GetConnection
rs.Open "tblBills", cn
rs.MoveFirst
Set f = Forms!frmMain!subBills.Form
Set f.Recordset = rs
Do Until rs.EOF
f("Date") = rs!duedate
f("Payee") = rs!Payee
f("MinDue") = rs!MinDue
f("Web") = rs!Web
f("Paid") = rs!Paid
f("Status") = rs!Status
rs.MoveNext
Loop
I've put breaks in and tried to debug, and I am getting the data I need with each loop. But, again, I am only getting the data from the last loop.
Does anybody know how (or if) I can make the form show all the records?
Thanks in advance,
mrmetal