Hi guys, I need an input on how to structure my database so that i can come up with a dynamic reporting.
My GUI is like this compose of labels and many checkboxes.
Those asterisk represent checkboxes. So the user can select 1 or more. The bold asterisk for example are checked or checked = 1. The ABCDEFG are categories as well. Now it's like they are crossing each other I'm confused on how to structure my database.Code:A B C D E F G Category1 Sub Category1A * * * * * * * Sub Category1B * * * * * * * Sub Category1C * * * * * * * Sub Category1D * * * * * * * Category2 Sub Category2A * * * * * * * Sub Category2B * * * * * * * Category3 Sub Category3A * * * * * * * Sub Category3B * * * * * * * Sub Category3C * * * * * * *
What i want to achieve is a report type like this in listview or any reporting control.
Code:A Category2 - Sub Category2A Category3 - Sub Category3A B Category1 - Sub Category1A, Sub Category1B Category3 - Sub Category3A C Category3 - Sub Category3C D Category1 - Sub Category1D E None F None G Category2 - Sub Category2A, Sub Category2B
The report is dynamic. If both sub categories fell on the the same it will put (,) comma.
Please help me guys. My checkbox are control array. The fields on my database are only the subcategories.
Here is what i started. I use this function to insert 1,0 values on the database. I don't know if it's right. it will put 0000000, if there is no check values. it will put 1111111 if all are checked.
I'm on dead end please help me. The dynamic reporting is a pain.Code:Private Function ReadChkBoxes(ByVal lngStart As Long, ByVal lngEnd As Long) As String Dim z As Long Dim pattern As String For z = lngStart To lngEnd If Check1(z).Value = 1 Then pattern = pattern & "1" Else pattern = pattern & "0" End If Next z SC = pattern End Function


Reply With Quote