Solved

show set number of records??

Posted on 2002-03-17
1
151 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
1 Comment
 
LVL 45

Accepted Solution

by:
aikimark earned 5 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
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 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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

746 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now