Quote:
Originally Posted by zepphead80
I didn't have any reference issues when using this code in VB 6 (Access). Do you want me to post which references I have enabled just to be sure?
Thanks!
Pat
Hi Pat,
This is simple and elegant but, sadly errors out for me. Perhaps a library problem as Mary thought. I tried it at home using Access '03/VBA Retail 6.4.8869 with the following references included:
Visual Basic for Applications
Microsoft Access 11.0
Microsoft DAO 3.6
Microsoft ActiveX Data Objects 2.1
OLE Automation
Anything else you have loaded that might be relevant?
The error is 94: Invalid use of Null, and is on .AddItem line of the MoveListItem sub. A little hovering tells me that ListFrom.Value is null as is Me.lstA and Me.lstB from the calling subs.
Also, the helpfile for .AddItem and .RemoveItem states that the list box RowSourceType must be "Value List", which means you would have to build the contents of the first listbox by code or hard key it when you design the form. A pain, but a mild one.
Jim