Guys,
I have changed the formatting in a report (the order the data shows under each heading) and now the data in each feild is appearing in the incorrect place (old place) when the report runs.
I have checked and double checked all the cell names and everything seems correct: I am really stumped on this one!
The original report from left to right was 5.2, 5.4, 5.7, 6.0, 6.6, 7.2
I have changed this around so it now reads 5.4, 5.7, 6.0, 5.2, 6.6, 7.2 but the data is still appearing in the old place!
I think it may have something to do with this event procedure code in the format box for the detail but don't know for sure or how to fix it.
Can someone look and advise?
Please be gentle on the code talk!
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Dim Ctrl As Control
For Each Ctrl In Me.Controls
If Ctrl.ControlType = acTextBox Then
If Left$(Ctrl.Name, 3) = "New" Then
If IsNull(Ctrl) = True Then
Ctrl.Visible = False
Else
Ctrl.Visible = True
End If
End If
End If
Next Ctrl
If Me.OrigValLocation <> Me.NewLocation Then Me.OrigValLocation.Visible = True Else Me.OrigValLocation.Visible = False
If Me.OrigValStatus <> Me.NewPackStatus Then Me.OrigValStatus.Visible = True Else Me.OrigValStatus.Visible = False
If Me.OrigValTreatment <> Me.NewTreatment Then Me.OrigValTreatment.Visible = True Else Me.OrigValTreatment.Visible = False
If Me.OrigValDrying <> Me.NewDrying Then Me.OrigValDrying.Visible = True Else Me.OrigValDrying.Visible = False
If Me.OriginalMarket <> Me.NewMarket Then TbMarket = "Market: " & OriginalMarket Else Me.TbMarket = ""
I have changed the formatting in a report (the order the data shows under each heading) and now the data in each feild is appearing in the incorrect place (old place) when the report runs.
I have checked and double checked all the cell names and everything seems correct: I am really stumped on this one!
The original report from left to right was 5.2, 5.4, 5.7, 6.0, 6.6, 7.2
I have changed this around so it now reads 5.4, 5.7, 6.0, 5.2, 6.6, 7.2 but the data is still appearing in the old place!
I think it may have something to do with this event procedure code in the format box for the detail but don't know for sure or how to fix it.
Can someone look and advise?
Please be gentle on the code talk!
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Dim Ctrl As Control
For Each Ctrl In Me.Controls
If Ctrl.ControlType = acTextBox Then
If Left$(Ctrl.Name, 3) = "New" Then
If IsNull(Ctrl) = True Then
Ctrl.Visible = False
Else
Ctrl.Visible = True
End If
End If
End If
Next Ctrl
If Me.OrigValLocation <> Me.NewLocation Then Me.OrigValLocation.Visible = True Else Me.OrigValLocation.Visible = False
If Me.OrigValStatus <> Me.NewPackStatus Then Me.OrigValStatus.Visible = True Else Me.OrigValStatus.Visible = False
If Me.OrigValTreatment <> Me.NewTreatment Then Me.OrigValTreatment.Visible = True Else Me.OrigValTreatment.Visible = False
If Me.OrigValDrying <> Me.NewDrying Then Me.OrigValDrying.Visible = True Else Me.OrigValDrying.Visible = False
If Me.OriginalMarket <> Me.NewMarket Then TbMarket = "Market: " & OriginalMarket Else Me.TbMarket = ""
Last edited: