?
Solved

add records to database and more records are being entered

Posted on 2011-05-05
3
Medium Priority
?
236 Views
Last Modified: 2012-05-11
hello I have a database attached: when I add records to listbox and then add to database- for some reason - more records are appearing in database- if you just add one- i think it works right- but if you add more- than alot of records show up- can you see my problem- thank you
data.mdb
0
Comment
Question by:davetough
3 Comments
 
LVL 85
ID: 35702448
How do you "add records to listbox"? A Listbox is not a user-editable control.

When you upload a database, you should include EXPLICIT instructions to recreate the issue. For example, "Open FormA, click ButtonB and then enter something TextboxC".
0
 
LVL 44

Accepted Solution

by:
GRayL earned 2000 total points
ID: 35702456
In click event   cmdAddtoDatabase_Click()

Change:

Do Until x = Me.lstIds.ListCount

to:

    Do Until x = Me.lstIds.ListCount-1

remember all these events are zero-based.

0
 

Author Closing Comment

by:davetough
ID: 35702922
Thanks GRayL and yes your right LSM- i usually try to do that-not here though
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses
Course of the Month15 days, 20 hours left to enroll

850 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