hi guys,
im revamping (redoing) a prisonInmate DB and i need guidance in creating the VBA for it.
Data structure:
The DB has inmates in 6 security classes (MinA, MinB, Med, Max, Rdc, Jasc) then they are divided into squads (A, B, C, P1, P2 etc) that mostly fall under one of the security classes except for a few (example P1 is both under MinA and MinB) that is whats messing with my head. the squads are actual areas where they are grouped in a prison so i cant change that structure.
So the result i would like to do is a Form with a listbox for each security class listing their corresponding squads and the amount of inmates under each squad and security class something like this
______________________________
Minimum tot 125
MinA MinB
A=25 R=5
B=25 T=35
P1=15 P1=20
________________________________
Medium tot 500
Med
VD=200
VD2=150
VDX=150
_______________________________
Maximum tot 550
Max
FR=300
BT=100
BA=150
________________________________
And so on , And so on...
________________________________
I was thinking maybe a DCount FOR loop...?
Tables:
tblClass: ID, CLASS
tblSquad: ID, SQUAD
tblInmate: ID, INMATENAME, CLASS(lookup tblClass), SQUAD(lookup tblSquad)
Right now all is done with separate Quires for each of the 87 Squads and each squad has a textBox in a form for each security class so its extremely UN-dynamic, its a real pain in my bottox to add a squad or remove or anything at all....basically.
I need some guidance structuring the VBA code, as it was a while ago i did VBA in MS Access.
Thanks in advance
im revamping (redoing) a prisonInmate DB and i need guidance in creating the VBA for it.
Data structure:
The DB has inmates in 6 security classes (MinA, MinB, Med, Max, Rdc, Jasc) then they are divided into squads (A, B, C, P1, P2 etc) that mostly fall under one of the security classes except for a few (example P1 is both under MinA and MinB) that is whats messing with my head. the squads are actual areas where they are grouped in a prison so i cant change that structure.
So the result i would like to do is a Form with a listbox for each security class listing their corresponding squads and the amount of inmates under each squad and security class something like this
______________________________
Minimum tot 125
MinA MinB
A=25 R=5
B=25 T=35
P1=15 P1=20
________________________________
Medium tot 500
Med
VD=200
VD2=150
VDX=150
_______________________________
Maximum tot 550
Max
FR=300
BT=100
BA=150
________________________________
And so on , And so on...
________________________________
I was thinking maybe a DCount FOR loop...?
Tables:
tblClass: ID, CLASS
tblSquad: ID, SQUAD
tblInmate: ID, INMATENAME, CLASS(lookup tblClass), SQUAD(lookup tblSquad)
Right now all is done with separate Quires for each of the 87 Squads and each squad has a textBox in a form for each security class so its extremely UN-dynamic, its a real pain in my bottox to add a squad or remove or anything at all....basically.
I need some guidance structuring the VBA code, as it was a while ago i did VBA in MS Access.
Thanks in advance