MikeAuz1979
Programmer
Hi,
Using access 2000 I have 2 list boxes that are supposed to perform the same action so I moved the code out to a module so I didn't have to repeat code, but I'm having trouble with that.
Below is my code which works fine when the listbox name is hardcoded into the for each line but I get an application deifned error when I try and run this using the line
Anyone have any ideas?
Thanks for any help
Mike
Using access 2000 I have 2 list boxes that are supposed to perform the same action so I moved the code out to a module so I didn't have to repeat code, but I'm having trouble with that.
Below is my code which works fine when the listbox name is hardcoded into the for each line but I get an application deifned error when I try and run this using the line
Code:
Call OpenAppoint(Me.lstDay)
Anyone have any ideas?
Thanks for any help
Mike
Code:
Public Sub OpenAppoint(Ctrl As Control)
dim frm as form
Set frm = Forms!frmSearch
For Each varItm In frm.Ctrl.ItemsSelected
Surname = frm!Ctrl.Column(1, (varItm))
Breed = frm!Ctrl.Column(2, (varItm))
DogName = frm!Ctrl.Column(3, (varItm))
Next varItm