Solved

VBA Listbox

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
PL/SQL can be a very powerful tool for working directly with database tables. Being able to loop will allow you to perform more complex operations, but can be a little tricky to write correctly. This article will provide examples of basic loops alon…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

911 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

22 Experts available now in Live!

Get 1:1 Help Now