daveblanch
Registered User.
- Local time
- Today, 20:37
- Joined
- Aug 3, 2010
- Messages
- 11
Hi,
I've tried searching but haven't come across what i need (might be my poor searching skills)
Basically, i need a subform to default to the latest record.
I have OnCurrent set as [SubFormName].Form.Recordset.MoveLast which works fine when the subform has a record to display.
However some of the main records do not have corresponding records to be displayed in the subform (may have been on annual leave and have no activity in that quarter) and when there is no record an error is thrown.
Could anyone help with the code to check if there is a record before moving to last record and if there is not then to not exectute?
Thanks,
DB.
I've tried searching but haven't come across what i need (might be my poor searching skills)
Basically, i need a subform to default to the latest record.
I have OnCurrent set as [SubFormName].Form.Recordset.MoveLast which works fine when the subform has a record to display.
However some of the main records do not have corresponding records to be displayed in the subform (may have been on annual leave and have no activity in that quarter) and when there is no record an error is thrown.
Could anyone help with the code to check if there is a record before moving to last record and if there is not then to not exectute?
Thanks,
DB.