The segment of code shown below is within a general module. I need a correct method to move to the last record on the referenced form. (I could do that with a another sort, but would like to know how to do it with a single statement if possible.)
Code:
If Screen.ActiveControl.Name = "tbGAPuse" Then 'Error 2474 if we're not on a control
dteGAPuse = Nz(DLookup("GAPuse", "QLibrary", "WorksID = " & lngID))
If dteGAPuse = 0 Then Exit Function
Forms("frmLibrary").Form.Filter = "GAPuse = " & "#" & dteGAPuse & "# AND CatNo > 9000"
Forms("frmLibrary").Form.FilterOn = True
Forms("frmLibrary").Form.OrderBy = "AliasVolID ASC, VolPos ASC"
Forms("frmLibrary").Form.OrderByOn = True
Forms("frmLibrary").Form.LblFltrOff.Visible = True
strFldrGAP1 = DLookup("CtlgNo", "QLibrary", "[WorksID] = " & lngID)
Forms("frmLibrary").Form.DoCmd.GoToRecord , , acLast '<<<<<<<<< This doesn't work
MsgBox strFldrGAP1 & " " & Forms("frmLibrary").Form.RecordsetClone.RecordCount 'DEBUG ONLY
MsgBox Forms("frmLibrary").Form.TitleExp 'DEBUG ONLY
Exit Function 'DEBUG ONLY
End If