Prvo napraviš tabelu,koja ima sve kolone iz referentne tabele za izveštaj,i dodaš im još polje yes/no.Zatim svakoj kontroli (labeli,text box-u) u izveštaju dodeliš vrednost Tag po principu vezana labela i textbox nosi jednu vrednost taga,zatim duga vezana labela i text box drugu vrednost taga i tako za sve labele i textboxove.Napraviš formu ,koja će imati record source onu tabelu sa poljima yes/no za svaku kolonu. i jedno komandno dugme preko koga otvaraš izveštaj.Na OnClick tog dugmeta ide kod
Code:
Private Sub Command8_Click()
On Error GoTo Err_Command8_Click
Dim stDocName As String
stDocName = "R3"
DoCmd.OpenReport stDocName, acPreview
If Me.ID = 0 Then
Dim ctl As Control
For Each ctl In Reports!R3
If ctl.Tag = "I" Then
ctl.Visible = False
End If
Next
Else
End If
If Me.PRVA = 0 Then
For Each ctl In Reports!R3
If ctl.Tag = "P" Then
ctl.Visible = False
End If
Next
Else
End If
If Me.DRUGA = 0 Then
For Each ctl In Reports!R3
If ctl.Tag = "D" Then
ctl.Visible = False
End If
Next
Else
End If
If Me.TRECA = 0 Then
For Each ctl In Reports!R3
If ctl.Tag = "T" Then
ctl.Visible = False
End If
Next
Else
End If
If Me.CETVRTA = 0 Then
For Each ctl In Reports!R3
If ctl.Tag = "C" Then
ctl.Visible = False
End If
Next
Else
End If
Exit_Command8_Click:
Exit Sub
Err_Command8_Click:
MsgBox Err.Description & Err.Number
Resume Exit_Command8_Click
End Sub
i to je to.U prilogu je primer.Pozdrav.