Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

show set number of records??

Posted on 2002-03-17
1
Medium Priority
?
160 Views
Last Modified: 2010-05-02
HI I am accessing a database like below how can show only 25 records per page

Dim search As String
Dim Lookin

Dim Name
   Dim Day As String
   Dim Address As String
   Dim Phone As String
   Dim Time As String
   Dim Scheduled_by As String
   Dim Company_Name As String
   Dim ID As String
   Dim myquery As String
   
Dim Field As String
Dim Searchcar As String
search = Request.Form("search")

search = Request.Form("search")
Lookin = Request.Form("lookin")
Field = Lookin
Searchcar = "LIKE"

'myquery = Field & " " & Searchcar & " '" & search & "'"
myquery = Field & " " & Searchcar & " '" & search & "'"
OpenConnection App.Path & "/apppointit.mdb"
   mRS.Open "SELECT * FROM appointment WHERE " & myquery & "", "" & mCN
  If mRS.EOF = True Then
  Response.Write "<b>No records found</b>"
  Exit Sub
  Else
    'While mRS.EOF <> True
 Do While Not mRS.EOF
 'For Each Colum In mRS.Fields
        ID = mRS.Fields("ID").Value
        Name = mRS.Fields("Name").Value
        Day = mRS.Fields("Date").Value
        Address = mRS.Fields("Address").Value
        Phone = mRS.Fields("Phone").Value
        Time = mRS.Fields("Time").Value
        Scheduled_by = mRS.Fields("Sceduler").Value
        Company_Name = mRS.Fields("Company").Value
   resronse.write "ID"
        mRS.MoveNext
       
        Loop
        mRS.Close
        Endit
0
Comment
Question by:hilltop
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 46

Accepted Solution

by:
aikimark earned 20 total points
ID: 6875684
Dim intRecsOnPage as Integer

Do While Not mRS.EOF
  intRecsOnPage = intRecsOnPage + 1



  If intRecsOnPage = 25 then
    intRecsOnPage = 0
    'Do End Of Page processing here
  End If

  mRS.Movenext

Loop
0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question