Hi All,
I'm trying to create my own class and having some problems accessing it. It's an Employee class and I have a method within this class to Search for an employee. I created an instance of the class when a user clicks a button to Add a new employee. However, when I try and use another button to search for an employee I can't use the same object I created before. Do I need to create another object just so I can call the Search method? I tried to make the object accessible to all by putting it just under 'Option Compare Database' on the code for the form where I will need to call the Employee class but that threw up errors.
Any help is appreciated.
thanks in advance
I'm trying to create my own class and having some problems accessing it. It's an Employee class and I have a method within this class to Search for an employee. I created an instance of the class when a user clicks a button to Add a new employee. However, when I try and use another button to search for an employee I can't use the same object I created before. Do I need to create another object just so I can call the Search method? I tried to make the object accessible to all by putting it just under 'Option Compare Database' on the code for the form where I will need to call the Employee class but that threw up errors.
Any help is appreciated.
thanks in advance