AlexN
Registered User.
- Local time
- Today, 04:05
- Joined
- Nov 10, 2014
- Messages
- 302
Hi everyone,
I have an unbound MainForm, bearing two subforms (SubFrmA, SubFrmB). The two subforms are related, so when I pick a record from SubFrmA data in SubFrmB changes showing related records. SubFrmB contains thousands of records related to every single record in SubFrmA, that’s why I want it to display only the 30 last ones of them.
I have a little piece of code (given by someone here a long time ago for another project)
but I don’t know under which event I should put it. Note that under the OnLoad event of the MainForm (or any of the subforms) [FONT="]it doesn’t work.
Any ideas ?
Thanks
[/FONT]
I have an unbound MainForm, bearing two subforms (SubFrmA, SubFrmB). The two subforms are related, so when I pick a record from SubFrmA data in SubFrmB changes showing related records. SubFrmB contains thousands of records related to every single record in SubFrmA, that’s why I want it to display only the 30 last ones of them.
I have a little piece of code (given by someone here a long time ago for another project)
Code:
Dim i As Integer
On Error Resume Next
DoCmd.RunCommand acCmdRecordsGoToLast
For i = 1 To 30
DoCmd.RunCommand acCmdRecordsGoToPrevious
Next i
Any ideas ?
Thanks
[/FONT]