Many many user controls

kdoig

New member
Joined
May 1, 2006
Messages
2
Programming Experience
3-5
I'm currently migrating an application developed in VBA in Access which made use of "continuous forms" to VB .Net. Normally, I would load the data into a datagrid. However, the data that needs to be manipulated includes several comboboxes and checkboxes which cannot be displayed in a datagrid. I created a user control and placed in all the controls necessary, and dynamically loaded and populated a new instance of the user control into a panel on my form, one user control per row returned from the DB.

I quickly realized that when my query returns 2400 rows, I'm going to run into a problem. I get the error "Error creating window handle.". I cut down how many user controls would be displayed in the panel by having a previous and next button to cycle through the dataset, and disposing of each user control from the previous iteration. This worked to a point. Initially I was able to load about 65 user controls in total, and after disposing of them am able to cycle through about 350 user controls, or records.

My question is, does anyone have a simpler way of simulating the functionality of continuous forms from VB6/VBA? Or any suggestions on how I can get around this error. Even though I'm disposing of each user control object, it seems that something is being created that isn't be disposed of properly, as I eventually run into the same "Error creating window handle" error.

Thanks for any suggestion,
 
from the sounds of it, you're saying that the database holds controls as records, right? instead of accessing the vba controls, just access the DB table(s) and display the table in the datagrid?

i also moved the thread to a more appropriate location too
 
Back
Top