473,406 Members | 2,281 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Report Detail_Format Event

Hi All,
I have a report with an accumulating value control. I use the Detail_Format
event to periodically change the backcolor of the control. The control
(Me.Tot) prints green except for the records where it reaches a multiple of
300. In the Open event I set the variable Milestone to an initial value of
300. On the initial records, Me.Tot prints with backcolor of green. When
Me.Tot reaches 300 I change the backcolor to red and reset Milestone to 600,
etc. So the records print green except for the records that reach a multiple
of 300.

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Me.Tot >= Milestone Then
Me.Tot.BackColor = vbRed
Milestone = Milestone + 300
Else
Me.Tot.BackColor = vbGreen
End If
End Sub

This report has many records so I use columns (down then across). It usually
works fine, but I have found one odd-ball scenario that breaks. On the rare
occasions when the record that reaches a multiple of 300 is also at the top
of a new column, the control prints green, NOT red. However, the
detail_format event IS firing, because the variable Milestone is changing
from 300 to 600.

I hope this explanation makes sense and somebody can respond. I think it
might have something to do with "retreat events" but I don't understand that
concept.

TIA,
Fred Zuckerman

Aug 30 '08 #1
0 2682

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Simone | last post by:
Hello. I am using the code below: ------------------------------------------- Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer) If Me.Section(0).BackColor = vbWhite Then...
3
by: CSDunn | last post by:
Hello, I have a situation in which each record on a report has 40 fields, any one of which can contain a value of 'C', or 'I', or 'B'. I need to create one calculated field on the report that will...
1
by: Nathan Bloomfield | last post by:
Does anyone know if there is any documentation which relates to Access2k + ? or can anyone help adjust the code? I am having trouble converting the DAO references. TITLE :INF: How to...
3
by: Dom | last post by:
Hi, I have a werid problem with a subreport. If someone can help me out I'd be very grateful! Based on results from a query, the visibility of textboxes and labels in a subreport are set to...
1
by: Wayne | last post by:
I have an image control in a report's detail section that gets its image from an invisible bound textbox (PhotoFile) on the report. The following code is placed in the report's Detail_Format event....
1
by: Parasyke | last post by:
I have a report that I want to print for a product specification sheet with a photo of the product. I have the photos stored in a separate folder from my Access 2000 database. I have a form that...
6
by: Oko | last post by:
I'm currently developing an MS Access Data Project (.adp) in MS Access 2002. One of the reports within the DB uses data that is Dynamic and cannot be stored on the SQL Server. To resolve this, I...
6
by: MLH | last post by:
I have a small bitmap graphic on a report. I would like to set it's Visible property to True whe the value of a certain field on the report is True. Can I do that? I have tried in the OnFormat...
4
by: J Lagos | last post by:
I want to change the backcolor of textboxes in a report depending on their value. I messed with this for a few hours but I'm not savvy with the syntax for getting at controls in a report. can...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.