R
Rob W
Greetings,
On my main form after the last combo box is populated I display my subform,
and I want to move the last record.
After searching the web I found the following code and tried it, Even though
the subform is populated (subform is based on a query matching values on
main form)
it never prints the debug message.
If i REMOVE the if statement i.e. not checking the number of records within
the subform it throws an error "3021 : No current record" this happens once
then the program can continue to run and display rows in the subform but
still never moving to the last row.
The name of the subform is correct using the value in NAME and not SOURCE
OBJECT.
Can anyone please assist/offer advice?
Thanks
Rob
Me.qryStudentsResultsDeliverysubform1.Enabled = True
Me.qryStudentsResultsDeliverysubform1.Visible = True
With Me.qryStudentsResultsDeliverysubform1.Form.RecordsetClone
' make sure there is at least one record
If Not .EOF And .BOF Then
MsgBox "Im in here"
Me.qryStudentsResultsDeliverysubform1.Form.RecordsetClone.MoveLast
End If
End With
Me.qryStudentsResultsDeliverysubform1.SetFocus
End Sub
On my main form after the last combo box is populated I display my subform,
and I want to move the last record.
After searching the web I found the following code and tried it, Even though
the subform is populated (subform is based on a query matching values on
main form)
it never prints the debug message.
If i REMOVE the if statement i.e. not checking the number of records within
the subform it throws an error "3021 : No current record" this happens once
then the program can continue to run and display rows in the subform but
still never moving to the last row.
The name of the subform is correct using the value in NAME and not SOURCE
OBJECT.
Can anyone please assist/offer advice?
Thanks
Rob
Me.qryStudentsResultsDeliverysubform1.Enabled = True
Me.qryStudentsResultsDeliverysubform1.Visible = True
With Me.qryStudentsResultsDeliverysubform1.Form.RecordsetClone
' make sure there is at least one record
If Not .EOF And .BOF Then
MsgBox "Im in here"
Me.qryStudentsResultsDeliverysubform1.Form.RecordsetClone.MoveLast
End If
End With
Me.qryStudentsResultsDeliverysubform1.SetFocus
End Sub