Solved

indexing database

Posted on 1998-07-26
3
136 Views
Last Modified: 2010-05-03
I am having difficulty appending records to the end of a database.  I understand how AddNew works but it sometimes puts records in between other records instead of at the index.  I even have a primary key that I created.  This primary key is of integer type and I increment it when I add a new record.  When it reaches 10, it appends that after index 1, not after index 9.  How do I overcome this?  I need to append each new record at the very end.
0
Comment
Question by:timpeters
  • 2
3 Comments
 
LVL 2

Expert Comment

by:percosolator
ID: 1466760
What are you using to view the data with?

Does it view like

1, 10, 11, 12, 2, 3, 4, 5, 6, 7, 8, 9?

0
 
LVL 2

Expert Comment

by:percosolator
ID: 1466761
Also, what type of database are you accessing?
0
 
LVL 1

Accepted Solution

by:
web_crusher earned 50 total points
ID: 1466762
the database is fine - you just view it with the wrong viewer

the data1.recordser.movelast - always go to the last record
and put there ,after the addnew, your record
you view it with a bad viewer
and buy the way - a key that based on an interger is very limited - try the auto if u use that kind of db or just arrange a function that add some character to one of your fields - a one that will be original and dont have couple of those - cause then u wont have a key!!!

open a datagrid - u'll c it fine!
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

758 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

17 Experts available now in Live!

Get 1:1 Help Now