Solved

show set number of records??

Posted on 2002-03-17
1
152 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Help in WHSCRIPT 9 47
Protecting vb6 & .Net code Obfuscation 18 95
Help with retrieving partial value from a column using VB.NET 4 43
vbModal 12 35
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…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

920 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

15 Experts available now in Live!

Get 1:1 Help Now