In the Details OnFormat Event, put the following code (change to your criteria and field names appropriately):
=========
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Me.Text1 > 120 Then
Me.Text1.FontBold = True
Else
Me.Text1.FontBold = False
End If
End Sub Jim Lunde
compugeeks@hotmail.com
We all agree your theory is crazy, but is it crazy enough?
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Me.Text1.FontBold = Me.Text2 > 100
End Sub Jim Lunde
compugeeks@hotmail.com
We all agree your theory is crazy, but is it crazy enough?
I have a report that needs more columns in the first six pages and for the first six pages to be printed in landscape. The rest of the report is printed in potrait format with a lesser number of columns. Is there any way to automate this process with code so
I am having the same problem except instead of bolding the data, I need to change the back color based on the criteria. Basically, if cost2 field is greater than cost1 field, display the data with green back color. Otherwise, display data with white back color. In the control source property, I click on the Expression Builder to write my IIF statement.
IIf([cost1] > [cost2], [cost] AND [cost].backcolor = 108854, [cost] AND [cost].backcolor = 567893)
I think my code and syntax are probably not correct, so can you help me with this problem.
Sorry, but I do not know how to do what you are requesting.
Di,
You would not do the comparison in your query, you would do it on the Format event of the detail section of your report:
Private Sub Detail_Format()
If Me.Cost1 > Me.Cost2 Then
Me.Cost.BackColor = 108854
Else
Me.Cost.BackColor = 567893
End If
End Sub
This is of course assuming you have 3 fields (cost, cost1 & cost2).
Jim Lunde
compugeeks@hotmail.com
We all agree your theory is crazy, but is it crazy enough?
I don't put my code in the query, I put them in the detail property control source box in the Report Design View. Isn't there a way that I can manipulate the property value with an absolute code.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.