J
JB
I apologize if this shows up a duplicate. My postings are not
appearing and I am not sure why.
------------------------------
This code is running in the Form_Load event of my mainform. It should
select the first subform record that is greater than or equal to
today's date. The subform is read only and all controls are locked.
lngCount gets set to 4 which is correct in my test example but the
record does not scoll into view inside the subform. The subform
contains five records and is large enough to view two at a time. This
code is an adapted sample so I am wondering if I am missing something?
I activated the record selectors as a test and the triangle is next to
the first record when the form is finished loading. I do not know why
that is and I can not trace the last GoToRecord command since I get an
error message that you can not do the GoTo command in Design View.
Dim lngCount As Long
Dim rs As DAO.Recordset
Set rs = Me.frmReservationListDetail.Form.RecordsetClone
rs.MoveFirst
rs.FindFirst "[Loan_Date] >= Date()"
If rs.NoMatch Then
DoCmd.GoToRecord , , acLast
Else
lngCount = rs.AbsolutePosition
DoCmd.GoToRecord , , lngCount
End If
appearing and I am not sure why.
------------------------------
This code is running in the Form_Load event of my mainform. It should
select the first subform record that is greater than or equal to
today's date. The subform is read only and all controls are locked.
lngCount gets set to 4 which is correct in my test example but the
record does not scoll into view inside the subform. The subform
contains five records and is large enough to view two at a time. This
code is an adapted sample so I am wondering if I am missing something?
I activated the record selectors as a test and the triangle is next to
the first record when the form is finished loading. I do not know why
that is and I can not trace the last GoToRecord command since I get an
error message that you can not do the GoTo command in Design View.
Dim lngCount As Long
Dim rs As DAO.Recordset
Set rs = Me.frmReservationListDetail.Form.RecordsetClone
rs.MoveFirst
rs.FindFirst "[Loan_Date] >= Date()"
If rs.NoMatch Then
DoCmd.GoToRecord , , acLast
Else
lngCount = rs.AbsolutePosition
DoCmd.GoToRecord , , lngCount
End If