Solved

VBA Listbox

Posted on 2012-03-23
3
885 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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

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…
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
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 …
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

831 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