MajP
You've got your good things, and you've got mine.
- Local time
- Today, 05:34
- Joined
- May 21, 2018
- Messages
- 9,484
When using a Class module, the advantage is that it is a Black box. You do not ever need to touch the code to use it. You just need to know how to intialize it and call its methods and functions. So you import as is the class.
To do that in your database you will import using the import from database function the class
You should then see a Class in the navigation called "ColumnListBox"
That is the beauty of object oriented programming. You do not need to know how the code works just how to use it.
If you look at my example there is no code in the form, all the code is in the class. It looks to me that you copied code into your form's module.
I am not advocating this as a good approach, there are probably 100s of ways to make this interface. But this is a simple exercise for learning how to use a custom classes.
You might like to try these classes which are Find as you type listboxes. Same thing you need to import the classes. Then look at the forms and see you you intialize the class. Should be 1 line of code to make the FAYT work. The demo has 10k records but you can find a name very quick.
But the idea of a single column that changes with the radio button, seems like that would be a good user interface. Like I said there are probably lots of ways.
To do that in your database you will import using the import from database function the class
You should then see a Class in the navigation called "ColumnListBox"
That is the beauty of object oriented programming. You do not need to know how the code works just how to use it.
If you look at my example there is no code in the form, all the code is in the class. It looks to me that you copied code into your form's module.
I am not advocating this as a good approach, there are probably 100s of ways to make this interface. But this is a simple exercise for learning how to use a custom classes.
You might like to try these classes which are Find as you type listboxes. Same thing you need to import the classes. Then look at the forms and see you you intialize the class. Should be 1 line of code to make the FAYT work. The demo has 10k records but you can find a name very quick.
But the idea of a single column that changes with the radio button, seems like that would be a good user interface. Like I said there are probably lots of ways.