Wrox Programmer Forums
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 10th, 2006, 08:45 AM
Authorized User
 
Join Date: Oct 2005
Posts: 48
Thanks: 0
Thanked 0 Times in 0 Posts
Default Listbox Problems

I'm an old VB 6 programmer and I thought we could add single items to list at a time.

list.additem "dummy_value"

How can I recreate this in vba?

 
Old March 10th, 2006, 09:03 AM
Authorized User
 
Join Date: Mar 2006
Posts: 80
Thanks: 0
Thanked 0 Times in 0 Posts
Default

In Access Listbox: Change Property RowSourceType to ValueList, and it's correct.
In Excel, Word (using MS forms objects): it's the same like VB syntax.

Peko

 
Old March 16th, 2006, 03:21 PM
Authorized User
 
Join Date: Apr 2004
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Peko is correct that you need to change the RowSourceType to ValueList, but this only works when using MS Access 2002 or 2003. With MS Access 97 and 2000 the additem method is not available for listboxes and comboboxes.

Don






Similar Threads
Thread Thread Starter Forum Replies Last Post
ListBox obrienkev C# 2005 4 November 6th, 2007 03:15 AM
multiple Listbox values in another listbox terryv Excel VBA 0 June 27th, 2007 07:01 AM
Listbox alastair Access 7 January 25th, 2006 05:53 PM
Chapter 3 Listbox Multiple problems Merl BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 9 December 26th, 2004 12:22 AM
I'm back :) Listbox var from listbox MichaelTJ .NET Web Services 2 October 21st, 2003 07:06 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.