pagination

mikekal

Member
Local time
Yesterday, 19:41
Joined
Jun 24, 2017
Messages
114
How can fix the pagination in Form1
 

Attachments

what is the problem? how do you replicate it?

If you are referring to the buttons across the bottom, I don't see any code to fix
 
When im going to open the Form1 shows me that;
 

Attachments

  • Screenshot (25).png
    Screenshot (25).png
    76.4 KB · Views: 129
Maybe wrap square brackets around the query name in the above noted error message. You have spaces in most of you object names.
 
as advised on post #4:
Code:
Private Sub Paginate_RecordSource(ByVal lRecCount As Long, _
                                   ByVal lRequestedPage As Long)
    Dim sSQL                  As String
    Dim lLastRec              As Long

    lLastRec = lRecCount - ((lRequestedPage - 1) * lRecPerPage)

    sSQL = "SELECT TOP " & lRecPerPage & " Tmp1.*  " & vbCrLf & _
           "FROM ( " & vbCrLf & _
           "   SELECT TOP " & lLastRec & " [Inventory Transactions Extended].* " & vbCrLf & _
           "   FROM [Inventory Transactions Extended] " & vbCrLf & _
           "   ORDER BY TransactionID DESC " & vbCrLf & _
           ") AS Tmp1  " & vbCrLf & _
           "ORDER BY TransactionID ASC"
  Me.InventoryTransactionsExtended.Form.RecordSource = sSQL
End Sub
 

Users who are viewing this thread

Back
Top Bottom