Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How move records between boxes like the built-in Wizards do?

Status
Not open for further replies.

ReillyAlbany

Technical User
Jul 19, 2002
9
US
I want a form that works just like the first form seen in the Access "Form Wizard". It will use a Combo Box to populate a List Box. This is List Box 1. List Box 2 will be placed to the right of List Box 1. Records will be added or removed between the two boxes using arrow buttons. When done the records in List Box 2 will be added to a table.

I need code for populating List Box 1 based on the Combo Box, for moving one record out of one List Box and into another, for moving all records out one List Box and into another, and for putting all the records from a List Box into a table.

Any and all help will be greatly appreciated. By the way I'd say my skill level would be deemed Intermediate, but this could promote me, in more ways than one. :)
 
Hi,

I came across an example a few weeks ago called frmMultiPik that does part of what you want. The form has two list boxes side by side and arrows between them that move items back and forth between the two list boxes. I think this is what you are looking for? It is easy to get the data into the first list box based on the combo box. The MultiPik example includes code in a Class Module that is very complex and it's way too much code to post on this forum. If you want a copy of it, send me an email and I'll send it to you. I modified it for my application, so I'm somewhat familiar with the code. However, you can probably use it as is. You will just need to figure out how to interface with it.

Best, dz
dzaccess@yahoo.com
 
The easiest way to do what you want is to use the ActiveX control "Microsoft Form 2.0 Listbox" via the menubar (INSERT|ACTIVEX CONTROL). It allows you to do a lot more than the standard list box. Check out fm20.hlp on you r hard drive for additional help on using this control.

Using this control makes it pretty easy to move items from one list box to another.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top