[AccessD] Goto specific record on datasheet
wrwehler at gmail.com
Thu Jan 27 13:22:39 CST 2022
Found this to work too, maybe a little more elegant:
.FindFirst "Report = TRUE"
If Not .NoMatch Then
Me!SampSubReport.Form.Bookmark = .Bookmark
On Thu, Jan 27, 2022 at 1:14 PM Ryan W <wrwehler at gmail.com> wrote:
> I don't often mess with seeking out a specific record programmatically, so
> I gave it a shot this morning:
> When you click a button, it goes to seek the first record with "Report"
> (checkbox) true:
> 'goto first tab
> Me!TabCtl42 = 0
> 'seek out first reported dcs
> DoCmd.GoToControl "SampSubReport"
> Do While Not Me!SampSubReport.Form!Report
> DoCmd.GoToRecord acActiveDataObject, , acNext
> This works pretty damn well. Once it gets to the first record where
> Report is true it does what it needs to do based on that data.
> Just wondering if there might be a better way?
More information about the AccessD