lists

G

gwynne000m1

I have a student who is doing am A-level project.

In VB, it is very easy to copy items from one list to another:

list2.additem list1.text -- for an item pointed to in list1.

However, this code does not work in VBA in access (I think it does not
recognise the list1.text).

Please help -- this seems as if it should be so simple.
 
N

Nikos Yannacopoulos

I have a student who is doing am A-level project.

In VB, it is very easy to copy items from one list to another:

list2.additem list1.text -- for an item pointed to in list1.

However, this code does not work in VBA in access (I think it does not
recognise the list1.text).
Quite so, as the two object models are different; I believe the .text
property in VB (which does not exist in Access VBA) is the equivalent of
the .Value property in Access VBA. Try this:

list2.additem list1.value

or, simply:

list2.additem list1

as the .value property is the default one when none is explicitly specified.

HTH,
Nikos
 
Top