pagination (1 Viewer)

mikekal

Member
Local time
Today, 03:33
Joined
Jun 24, 2017
Messages
114
How can fix the pagination in Form1
 

Attachments

  • Desktop Inventory.zip
    5.1 MB · Views: 116

CJ_London

Super Moderator
Staff member
Local time
Today, 11:33
Joined
Feb 19, 2013
Messages
16,637
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
 

mikekal

Member
Local time
Today, 03:33
Joined
Jun 24, 2017
Messages
114
When im going to open the Form1 shows me that;
 

Attachments

  • Screenshot (25).png
    Screenshot (25).png
    76.4 KB · Views: 71

Mike Krailo

Well-known member
Local time
Today, 06:33
Joined
Mar 28, 2020
Messages
1,044
Maybe wrap square brackets around the query name in the above noted error message. You have spaces in most of you object names.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 18:33
Joined
May 7, 2009
Messages
19,246
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

Top Bottom