|
-
Apr 20th, 2007, 06:21 AM
#1
Thread Starter
Hyperactive Member
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
-
Apr 20th, 2007, 07:33 AM
#2
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.
-
Apr 20th, 2007, 08:08 AM
#3
Thread Starter
Hyperactive Member
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
-
Apr 20th, 2007, 08:36 AM
#4
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?
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...
-
Apr 20th, 2007, 02:11 PM
#5
Thread Starter
Hyperactive Member
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)
-
Apr 20th, 2007, 03:10 PM
#6
Re: ListBox misses out 1th Record and 1th Column!
 Originally Posted by singularis
- listbox.addItem()...
 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?
 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.
-
Apr 20th, 2007, 03:25 PM
#7
Hyperactive Member
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.
-
Apr 20th, 2007, 05:02 PM
#8
Thread Starter
Hyperactive Member
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....
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|