473,654 Members | 3,280 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

wrong RecordCount

why does my recordcount returns the # of actual records + 1? btw, i
am using ms access. i don't know what happened but at first, my table
seems ok. the recordcount returns the correct # of records. but as i
manipulate the table, (add, delete, etc) i get errors and when i
checked my recordcount, it returns 1 more than the actual # of
records. what did i do? how can i avoid this to happen again?
please help!
nick_faye
Nov 12 '05 #1
2 2073
iv******@yahoo. com (nick_faye) wrote in message news:<8a******* *************** ***@posting.goo gle.com>...
why does my recordcount returns the # of actual records + 1? btw, i
am using ms access. i don't know what happened but at first, my table
seems ok. the recordcount returns the correct # of records. but as i
manipulate the table, (add, delete, etc) i get errors and when i
checked my recordcount, it returns 1 more than the actual # of
records. what did i do? how can i avoid this to happen again?
please help!
nick_faye


Guess how many fingers I'm holding up.

What kind of recordset? could we see the code? (Sorry, my crystal
ball is in the shop.) "btw, [you] are using Access."
Congratulations . You're in the right group. What's the difference
between "at first" and now? If you're opening a static recordset and
now refreshing the count, then there's your problem.
Nov 12 '05 #2
pi********@hotm ail.com (Pieter Linden) wrote in message news:<bf******* *************** ****@posting.go ogle.com>...
iv******@yahoo. com (nick_faye) wrote in message news:<8a******* *************** ***@posting.goo gle.com>...
why does my recordcount returns the # of actual records + 1? btw, i
am using ms access. i don't know what happened but at first, my table
seems ok. the recordcount returns the correct # of records. but as i
manipulate the table, (add, delete, etc) i get errors and when i
checked my recordcount, it returns 1 more than the actual # of
records. what did i do? how can i avoid this to happen again?
please help!
nick_faye


Guess how many fingers I'm holding up.

What kind of recordset? could we see the code? (Sorry, my crystal
ball is in the shop.) "btw, [you] are using Access."
Congratulations . You're in the right group. What's the difference
between "at first" and now? If you're opening a static recordset and
now refreshing the count, then there's your problem.


what do you mean by a static recordset? and how do you refresh your
recordcount? sorry but i am still a newbie. hope you have a lot of
patience. what i meant by "at first" is the time i created the table
until i experience the error. "now" means the time that i am having
problems. :) i don't know what happened between "at first" and "now"
that caused my problem.
Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
5068
by: Jeff Boyer | last post by:
Hello everyone, Can someone tell me why a ADO recordset.recordcount would return a -1? I have confirmed that it has records in it by writing some values to the screen. Why can't I count the number of records returned though? Please help, Jeff P.S. I am using VBScript for my code connecting to a SQL Server 2000 database
12
2967
by: scott | last post by:
In LISTING 2, I have a SPROC that returns a recordset and a recordcount in SQL QA. I can access the Recordset with no problem. How can I grab the Recordcount with ASP code at the same time I'm getting the Recordset? In QA, the RecordCount displays below the Recordset. The below USAGE code will display my SPROC results. USAGE: EXEC SELECT_WITH_PAGING 'CustomerID, ShipName', 'OrderID', 'Northwind.dbo.Orders', 3, 10, 1, '', 'OrderDate'...
2
3860
by: Rick Brown | last post by:
I get a "subscript out of range" error when I run this code. "Rcount = rsSupplierCode.RecordCount" Returns 49 BUT "numReturned = UBound(varRecords, 2) + 1" Returns only 3 I'm I wrong to believe both should return 49? Dim dbs As DATABASE Dim qdfSupplierCode As QueryDef
4
4880
by: don.fleming | last post by:
Hi folks: Am doing a VBA SQL Select stmt with multiple rows found and not getting RecordCount > 1. I've verified there are multiple rows found by copying my SQL stmt from Debug window and pasting it to a query - retrieves many rows. I need to program to handle many Rows in VBA. Suggestions much appreciated! Here is an excerpt of my VBA code after the SQLstmt is built: Debug.Print SQLstmt Set RecSet1 = SQLtbl.OpenRecordset(SQLstmt)
10
6721
by: Robert | last post by:
How do you get an accurate count of the number of records returned from a query when using linked tables. I have an access 2003 database as a front end to another access 2003 database that contains only tables. I have linked the tables for the front end to the back end database. I am trying to set the recordsource of a form to a query established by the user to narrow the scope but I don't want to display the form if there are no...
3
2529
by: nkechifesie | last post by:
I want my form to display the absolute position and the recordcount of the records in the database but it keeps shoing me -1 for both . Why? this is the code Private Sub MnuOVehType_Click() Load FrmTypeEntry For i = 1 To 4 FrmTypeEntry.cmdControl(i).Enabled = True Next i For j = 0 To 3
2
2161
by: rajvbprogramer | last post by:
here is my problem. i have two records. one containing 20 records and second containing 30 records. now i want the recordcount property to use and go to the 21 record. i m calculating the recordcount of both the record. now i m doing this a = rs.recordcount b = rs1.recordcount for x = b+1 to a
4
10950
by: rando1000 | last post by:
I've got a form pulling data from a table in the same database. The code below shows how the variables are set up. The problem is, the intRecs variable is 1, no matter how many rows I've got in the recordset. What am I doing wrong? Dim dbs As Database Dim rs As Recordset Dim intRecs as Integer Dim intCounter as integer Set dbs = CurrentDb Set rs = dbs.OpenRecordset("Select * from TodaysSalesReps")
12
12360
by: anantraoneel | last post by:
Hi Friend My project is a Library System. In Project is Book Master form. If I've select Book Type from Type Master and Publication from Publication Master then this error has come: "Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another. " but if I've put amount manually and save the record then record has been successfully saved. For selection of Book Type and Publication I've used Combo...
0
8376
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8290
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8815
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
7307
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6161
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4149
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4294
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2716
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1916
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.