hi any help>
i want to genarate report that show only record which have "Not Normal"
if report Field contain text "Normal" then i dont want its shown in my report
if its NOT Normal then i want to see the the record
hi any help> i want to genarate report that show only record which have "Not Normal" if report Field contain text "Normal" then i dont want its shown in my report if its NOT Normal then i want to see the the record shold be like this :-
Suggestions offered are to apply filter so records are not retrieved. Not use VBA to set visibility of controls. However, I now see that each memo is not a record it is a field. Code to set visibility must be in Format or Print event of section controls are located in. These events trigger only for PrintPreview or direct to printer.
Consider:
Code:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
With Me
.Memo1_Label.Visible = .Memo1 = "Normal"
.Memo1.Visible = .Memo1 = "Normal"
.Memo2_Label.Visible = .Memo2 = "Normal"
.Memo2.Visible = .Memo2 = "Normal"
.Memo3_Label.Visible = .Memo3 = "Normal"
.Memo3.Visible = .Memo3 = "Normal"
.Memo4_Label.Visible = .Memo4 = "Normal"
.Memo4.Visible = .Memo4 = "Normal"
.Memo5_Label.Visible = .Memo5 = "Normal"
.Memo5.Visible = .Memo5 = "Normal"
.Memo6_Label.Visible = .Memo6 = "Normal"
.Memo6.Visible = .Memo6 = "Normal"
End With
End Sub
or
Code:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Dim x As Integer
With Me
For x = 1 To 6
.Controls("Memo" & x & "_Label").Visible = .Controls("Memo" & x) = "Normal"
.Controls("Memo" & x).Visible = .Controls("Memo" & x) = "Normal"
Next
End With
End Sub
Need to remove the layout that is grouping controls. Select controls and right click: Layout > Remove Layout.
Could simplify by removing labels. They aren't really informative. Should certainly reduce size of labels and widen textboxes.
However, there will still be blank space where controls sit. Set textbox CanShrink to Yes. Occupied space will reduce but spacing will look a bit uneven.
An option is to normalize structure with a dependent table for memos where each memo is a record. A sub report can have filter to exclude the "Not Normal" records.
Suggestions offered are to apply filter so records are not retrieved. Not use VBA to set visibility of controls. However, I now see that each memo is not a record it is a field. Code to set visibility must be in Format or Print event of section controls are located in. These events trigger only for PrintPreview or direct to printer.
Consider:
Code:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
With Me
.Memo1_Label.Visible = .Memo1 = "Normal"
.Memo1.Visible = .Memo1 = "Normal"
.Memo2_Label.Visible = .Memo2 = "Normal"
.Memo2.Visible = .Memo2 = "Normal"
.Memo3_Label.Visible = .Memo3 = "Normal"
.Memo3.Visible = .Memo3 = "Normal"
.Memo4_Label.Visible = .Memo4 = "Normal"
.Memo4.Visible = .Memo4 = "Normal"
.Memo5_Label.Visible = .Memo5 = "Normal"
.Memo5.Visible = .Memo5 = "Normal"
.Memo6_Label.Visible = .Memo6 = "Normal"
.Memo6.Visible = .Memo6 = "Normal"
End With
End Sub
or
Code:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Dim x As Integer
With Me
For x = 1 To 6
.Controls("Memo" & x & "_Label").Visible = .Controls("Memo" & x) = "Normal"
.Controls("Memo" & x).Visible = .Controls("Memo" & x) = "Normal"
Next
End With
End Sub
Need to remove the layout that is grouping controls. Select controls and right click: Layout > Remove Layout.
Could simplify by removing labels. They aren't really informative. Should certainly reduce size of labels and widen textboxes.
However, there will still be blank space where controls sit. Set textbox CanShrink to Yes. Occupied space will reduce but spacing will look a bit uneven.
An option is to normalize structure with a dependent table for memos where each memo is a record. A sub report can have filter to exclude the "Not Normal" records.