add records to database and more records are being entered

Posted on 2011-05-05
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
Question by:davetough
    LVL 84
    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".
    LVL 44

    Accepted Solution

    In click event   cmdAddtoDatabase_Click()


    Do Until x = Me.lstIds.ListCount


        Do Until x = Me.lstIds.ListCount-1

    remember all these events are zero-based.


    Author Closing Comment

    Thanks GRayL and yes your right LSM- i usually try to do that-not here though

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    It took me quite some time to sort out all the different properties of combo and list boxes available from Visual Basic at run-time. Not that the documentation is lacking: the help pages are quite thorough and well written. The problem was rather wh…
    Today's users almost expect this to happen in all search boxes. After all, if their favourite search engine juggles with tens of thousand keywords while they type, and suggests matching phrases on the fly, why shouldn't they expect the same from you…
    Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
    In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

    779 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