Results 1 to 8 of 8

Thread: ListBox misses out 1th Record and 1th Column!

  1. #1

    Thread Starter
    Hyperactive Member singularis's Avatar
    Join Date
    Nov 2006
    Location
    Over There!
    Posts
    372

    ListBox misses out 1th Record and 1th Column!

    When my listbox displays all my records it misses out displaying the Username (1th Column) and my first record.

    Could anyone explain this
    If what I said was helpful, give me rep!

    My Complete Games: -- 2D Zone (Space Shooter game) || _2D Zone 2_ || Ninja Blob (2D platformer) || Dren (Co-op up to 4 player base defence game)

    My Projects: -- The Dread Engine (2D VB game Engine) || A* Path Finding


    An excellent site for learning DirectX7, 8 & 9 (for VB6, C# & VB.net) would be: directx4vb.vbgamer.com --- For my projects and games see: pieper.freehostia.com

  2. #2
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132

    Re: ListBox misses out 1th Record and 1th Column!

    - what programming language do you use?
    - what database (if any) do you use?
    - what type of listbox do you use?
    - how do you populate your listbox?

    Few other questions may popup as well but as you can see you have to be much more specific when searching for a help.

  3. #3

    Thread Starter
    Hyperactive Member singularis's Avatar
    Join Date
    Nov 2006
    Location
    Over There!
    Posts
    372

    Re: ListBox misses out 1th Record and 1th Column!

    - VBA with Access
    - Access
    - The only one you can use
    - listbox.addItem()

    Sorry, I wrote that in a rush
    If what I said was helpful, give me rep!

    My Complete Games: -- 2D Zone (Space Shooter game) || _2D Zone 2_ || Ninja Blob (2D platformer) || Dren (Co-op up to 4 player base defence game)

    My Projects: -- The Dread Engine (2D VB game Engine) || A* Path Finding


    An excellent site for learning DirectX7, 8 & 9 (for VB6, C# & VB.net) would be: directx4vb.vbgamer.com --- For my projects and games see: pieper.freehostia.com

  4. #4
    Don't Panic! Ecniv's Avatar
    Join Date
    Nov 2000
    Location
    Amsterdam...
    Posts
    5,343

    Re: ListBox misses out 1th Record and 1th Column!

    Missing column is on columnwidths property - if you have 0;1cm... you hide the first column (handy to hidde the ID)

    Can't see why you'd be missing the first (1st) row and column unless you are looping from 1 instead of 0 to populate the rows and columns.

    Can you post your code to populate the list box?

    BOFH Now, BOFH Past, Information on duplicates

    Feeling like a fly on the inside of a closed window (Thunk!)
    If I post a lot, it is because I am bored at work! ;D Or stuck...
    * Anything I post can be only my opinion. Advice etc is up to you to persue...

  5. #5

    Thread Starter
    Hyperactive Member singularis's Avatar
    Join Date
    Nov 2006
    Location
    Over There!
    Posts
    372

    Re: ListBox misses out 1th Record and 1th Column!

    There is no 'code' needed. When I created the listBox it was 'linked' to my table. However in the property DataSource (in the listbox) was an SQL query. Like this:

    DataSource..........: SELECT * FROM Users

    Note that the above is not the exact value I entered. I only wrote it so you could understand what I meant.

    I will post the Database as soon as I have access to it (In about two days)
    If what I said was helpful, give me rep!

    My Complete Games: -- 2D Zone (Space Shooter game) || _2D Zone 2_ || Ninja Blob (2D platformer) || Dren (Co-op up to 4 player base defence game)

    My Projects: -- The Dread Engine (2D VB game Engine) || A* Path Finding


    An excellent site for learning DirectX7, 8 & 9 (for VB6, C# & VB.net) would be: directx4vb.vbgamer.com --- For my projects and games see: pieper.freehostia.com

  6. #6
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132

    Re: ListBox misses out 1th Record and 1th Column!

    Quote Originally Posted by singularis
    - listbox.addItem()...
    Quote Originally Posted by singularis
    There is no 'code' needed. When I created the listBox it was 'linked' to my table...
    I'm a little confused - first you said "AddItem" and now "it's linked"...
    Which one is true?


    Quote Originally Posted by singularis
    DataSource..........: SELECT * FROM Users
    Note that the above is not the exact value I entered...
    And that could make a huge difference if you specify list of fields in your query.

  7. #7
    Hyperactive Member
    Join Date
    Jun 2006
    Posts
    396

    Re: ListBox misses out 1th Record and 1th Column!

    When you put a listbox on a form a wizard should step you through the process linking it to a table. This is what I understand you to mean when you say

    There is no 'code' needed. When I created the listBox it was 'linked' to my table.

    The wizard will also give you the option of hiding the key column.

    There is no datasource property associated with a listbox. Your statement...

    DataSource..........: SELECT * FROM Users

    doesn't make sense to me.

    You should have a Data Source Type which defaults to Table/Query and you should have Row Source which defaults to the fields you picked in your table. It should look something like Select yourTable.Field1, yourTable.Field2, yourTable.Field3;

    Your listbox should display all the rows in your table and all the fields you have chosen. The only possibilty I can think of is that you have NULL values in your first row.

  8. #8

    Thread Starter
    Hyperactive Member singularis's Avatar
    Join Date
    Nov 2006
    Location
    Over There!
    Posts
    372

    Re: ListBox misses out 1th Record and 1th Column!

    @LinXG & RhinoBull: Sorry for being confusing, but I did not have the information in front of me and guessed the values and properties so that you get a gist of what I am talking about.

    Thanks for helping me, I will reply if it works....
    If what I said was helpful, give me rep!

    My Complete Games: -- 2D Zone (Space Shooter game) || _2D Zone 2_ || Ninja Blob (2D platformer) || Dren (Co-op up to 4 player base defence game)

    My Projects: -- The Dread Engine (2D VB game Engine) || A* Path Finding


    An excellent site for learning DirectX7, 8 & 9 (for VB6, C# & VB.net) would be: directx4vb.vbgamer.com --- For my projects and games see: pieper.freehostia.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width