Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

show set number of records??

Posted on 2002-03-17
1
Medium Priority
?
161 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 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

[Webinar] Cloud Security

In this webinar you will learn:

-Why existing firewall and DMZ architectures are not suited for securing cloud applications
-How to make your enterprise “Cloud Ready”, and fix your aging DMZ architecture
-How to transform your enterprise and become a Cloud Enabler

Question has a verified solution.

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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
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…
Suggested Courses

971 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