R
Rob
In an old version of access I used some code to make a
selection by using 2 listboxes. first listbox contains the
nonselected items and the second the selected items. With
the items in the second listbos I want to run a query.
I have some code but this does not work for access97, can
sombody help me to translate?
Function NSPCdoubleclick()
Dim ds As Dynaset, db As Database
Set db = CurrentDb()
MyType$ = Forms!Form_Selection!PCNotSelected.Column(0)
Set ds = db.CreateDynaset("select * from [Product
category] where [ProductCatDescription] = '" + MyType$
+ "';")
ds.Edit
ds.[Selected] = True
ds.UPDATE
ds.Close
DoCmd.Requery "PCNotSelected" ' listbox1
DoCmd.Requery "PCSelected" ' listbox2
Exit Function
/Rob
selection by using 2 listboxes. first listbox contains the
nonselected items and the second the selected items. With
the items in the second listbos I want to run a query.
I have some code but this does not work for access97, can
sombody help me to translate?
Function NSPCdoubleclick()
Dim ds As Dynaset, db As Database
Set db = CurrentDb()
MyType$ = Forms!Form_Selection!PCNotSelected.Column(0)
Set ds = db.CreateDynaset("select * from [Product
category] where [ProductCatDescription] = '" + MyType$
+ "';")
ds.Edit
ds.[Selected] = True
ds.UPDATE
ds.Close
DoCmd.Requery "PCNotSelected" ' listbox1
DoCmd.Requery "PCSelected" ' listbox2
Exit Function
/Rob