Solved

VBA Listbox

Posted on 2012-03-23
3
886 Views
Last Modified: 2012-03-23
Can you please help me to add values dynamically to listbox columns.?

The following code giving me an error (2nd line) "Object required"

Me.List_Box_Account.AddItem "my vlaue a1"
            Me.List_Box_Account.Column(0, 1) = "my value a2"


Requirement: Trying to populate Listbox with three columns using vba (access).

Thanks in advance
0
Comment
Question by:gtmathewDallas
  • 2
3 Comments
 
LVL 47

Accepted Solution

by:
Dale Fye (Access MVP) earned 500 total points
ID: 37758599
assuming that you are creating a two column list, try:

    me.list_box_Account.AddItem "my value a1; my value a2"
0
 

Author Comment

by:gtmathewDallas
ID: 37758650
Thanks a lot  Fyed,.. Its working for me.., Also I  want to thank you for your other posts- which  helped(helping) me a lot during the development..
0
 
LVL 47

Expert Comment

by:Dale Fye (Access MVP)
ID: 37758668
Thanks,

Glad to help.
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

If you find yourself in this situation “I have used SELECT DISTINCT but I’m getting duplicates” then I'm sorry to say you are using the wrong SQL technique as it only does one thing which is: produces whole rows that are unique. If the results you a…
Confronted with some SQL you don't know can be a daunting task. It can be even more daunting if that SQL carries some of the old secret codes used in the Ye Olde query syntax, such as: (+)     as used in Oracle;     *=     =*    as used in Sybase …
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…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

808 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