473,734 Members | 2,693 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Fill colour in field on a report

I have a problem is it possible to highlight a field on a report in
access 97.

If a tick appear in follow up call box, I would like access to
highlight the field. is this possible, I have managed to highlight the
field in the form, by using the tick, was just wondering if it can also
be done on the report, so as to appear on the hard copy.

Any information on this much appreciated.

Jul 3 '06 #1
11 3039
feeman wrote:
I have a problem is it possible to highlight a field on a report in
access 97.

If a tick appear in follow up call box, I would like access to
highlight the field. is this possible, I have managed to highlight the
field in the form, by using the tick, was just wondering if it can
also be done on the report, so as to appear on the hard copy.

Any information on this much appreciated.
You don't say what you mean by "highlight" , but you could use code in the
OnFormat event of the report section where the control resides to change the
color. make the font bold or what-have-you.

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
Jul 3 '06 #2
By highlight I mean fill the customer name field to a different colour,
so that it stands out on the report when it is printed.

What code would you use on the onformat event

Jul 4 '06 #3
By highlight I mean fill the customer name field to a different colour,
so that it stands out on the report when it is printed.

What code would you use on the onformat event

Jul 4 '06 #4
feeman wrote:
By highlight I mean fill the customer name field to a different
colour, so that it stands out on the report when it is printed.

What code would you use on the onformat event
If Me!CheckBoxName = True Then
Me!TextBoxName. BackColor = vbYellow
Else
Me!TextBoxName. BackColor = wbWhite
End If

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
Jul 4 '06 #5

Rick Brandt wrote:
feeman wrote:
By highlight I mean fill the customer name field to a different
colour, so that it stands out on the report when it is printed.

What code would you use on the onformat event

If Me!CheckBoxName = True Then
Me!TextBoxName. BackColor = vbYellow
Else
Me!TextBoxName. BackColor = wbWhite
End If

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
I have put this code into the on openevent in the report properties,
but it keeps stopping on the first line of code.

Jul 4 '06 #6

"feeman" <fe*********@fe ehally128.karoo .co.ukwrote in message
news:11******** **************@ b68g2000cwa.goo glegroups.com.. .
>
Rick Brandt wrote:
>feeman wrote:
By highlight I mean fill the customer name field to a different
colour, so that it stands out on the report when it is printed.

What code would you use on the onformat event

If Me!CheckBoxName = True Then
Me!TextBoxName. BackColor = vbYellow
Else
Me!TextBoxName. BackColor = wbWhite
End If

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com

I have put this code into the on openevent in the report properties,
but it keeps stopping on the first line of code.
No it needs to be in the format event of the report section where the control
resides so it can be fired for each occurrence. The Open event (even if it
worked) fires only once so it would set the Background based on the first record
and then never change it again.

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
Jul 4 '06 #7

Rick Brandt wrote:
"feeman" <fe*********@fe ehally128.karoo .co.ukwrote in message
news:11******** **************@ b68g2000cwa.goo glegroups.com.. .

Rick Brandt wrote:
feeman wrote:
By highlight I mean fill the customer name field to a different
colour, so that it stands out on the report when it is printed.

What code would you use on the onformat event

If Me!CheckBoxName = True Then
Me!TextBoxName. BackColor = vbYellow
Else
Me!TextBoxName. BackColor = wbWhite
End If

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
I have put this code into the on openevent in the report properties,
but it keeps stopping on the first line of code.

No it needs to be in the format event of the report section where the control
resides so it can be fired for each occurrence. The Open event (even if it
worked) fires only once so it would set the Background based on the first record
and then never change it again.

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
Sorry to be a pain rick and thanks for all your help, as you can tell
pretty new to this learning as I go along.

I have put this code

Private Sub Detail_Format(C ancel As Integer, FormatCount As Integer)
If Me![O/S] = -1 Then
Me![Cat No].BackColor = vbYellow
Else
Me![Cat No].BackColor = wbWhite
End If

End Sub

in the detail properties on format event section of the report. and
both O/S and Cat number are under this section heading. the report now
works but the cat number is not coloured, if the o/s is ticked.

Jul 4 '06 #8

Rick Brandt wrote:
"feeman" <fe*********@fe ehally128.karoo .co.ukwrote in message
news:11******** **************@ b68g2000cwa.goo glegroups.com.. .

Rick Brandt wrote:
feeman wrote:
By highlight I mean fill the customer name field to a different
colour, so that it stands out on the report when it is printed.

What code would you use on the onformat event

If Me!CheckBoxName = True Then
Me!TextBoxName. BackColor = vbYellow
Else
Me!TextBoxName. BackColor = wbWhite
End If

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
I have put this code into the on openevent in the report properties,
but it keeps stopping on the first line of code.

No it needs to be in the format event of the report section where the control
resides so it can be fired for each occurrence. The Open event (even if it
worked) fires only once so it would set the Background based on the first record
and then never change it again.

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
Sorry to be a pain rick and thanks for all your help, as you can tell
pretty new to this learning as I go along.

I have put this code

Private Sub Detail_Format(C ancel As Integer, FormatCount As Integer)
If Me![O/S] = -1 Then
Me![Cat No].BackColor = vbYellow
Else
Me![Cat No].BackColor = wbWhite
End If

End Sub

in the detail properties on format event section of the report. and
both O/S and Cat number are under this section heading. the report now
works but the cat number is not coloured, if the o/s is ticked.

Jul 4 '06 #9

Rick Brandt wrote:
"feeman" <fe*********@fe ehally128.karoo .co.ukwrote in message
news:11******** **************@ b68g2000cwa.goo glegroups.com.. .

Rick Brandt wrote:
feeman wrote:
By highlight I mean fill the customer name field to a different
colour, so that it stands out on the report when it is printed.

What code would you use on the onformat event

If Me!CheckBoxName = True Then
Me!TextBoxName. BackColor = vbYellow
Else
Me!TextBoxName. BackColor = wbWhite
End If

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
I have put this code into the on openevent in the report properties,
but it keeps stopping on the first line of code.

No it needs to be in the format event of the report section where the control
resides so it can be fired for each occurrence. The Open event (even if it
worked) fires only once so it would set the Background based on the first record
and then never change it again.

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
Sorry to be a pain rick and thanks for all your help, as you can tell
pretty new to this learning as I go along.

I have put this code

Private Sub Detail_Format(C ancel As Integer, FormatCount As Integer)
If Me![O/S] = -1 Then
Me![Cat No].BackColor = vbYellow
Else
Me![Cat No].BackColor = wbWhite
End If

End Sub

in the detail properties on format event section of the report. and
both O/S and Cat number are under this section heading. the report now
works but the cat number is not coloured, if the o/s is ticked.

Jul 4 '06 #10

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

Similar topics

2
1518
by: David CL Francis | last post by:
There may be a simple answer to this but I cannot find it! I want a to print a control on a report in a different colour depending on the value of the control. In my case the field contains either 'AM' or 'PM' and defines membership in a database. Windows XP pro and Office pro 2003 -- David CL Francis
2
2358
by: Adam Maltby | last post by:
Hi does anyone know how to fill a rectangle with an ellipse style fill (ie so it gives a spotlight effect on a rectange?) I know how to create rectangles, ellipses etc and I can fill the rect with an oversized ellipse, but given how far over the edge of the view it has to go, it loses the defining edges on the colours..... I need the fill to go out as far as the outer ellipse colour, and then the rest of the visible form take that colour.......
0
323
by: feeman | last post by:
A while back I asked about changing the background colour of a text box according to the outcome of a tick box, and the code below was supplied which worked very well. Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer) If Me! = -1 Then Me!.BackColor = vbYellow Else Me!.BackColor = wbWhite End If
2
2173
by: Julian | last post by:
I setup a Conditional formatting on one of my columns with an expression that looks like: Like "Wrong Number" with some reddish highlight (fill). The fill shows on the screen, but does not print. If I add some colour to the text, then the text will print in that colour, but the fill does not print under any circumstances.
2
5668
by: Mike.Wolowicz | last post by:
I have a report that changes background colour when a running total field hits a certain value... Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer) If >= 2400001 Then Me.Section(0).BackColor = 16053492 Else Me.Section(0).BackColor = 16777215 End If End Sub
9
8144
by: Eric Lindsay | last post by:
How do you provide a consistent gradient fill as a background in a liquid layout? If I make a gradient fill image say 1000 pixels wide (and repeat it down the page) to suit a typical computer display, then only a small portion of the gradient will show if the viewpoint is a smaller PDA or phone display. On the other hand, if viewed full screen on a 1920 pixel wide display, I would run out of gradient on one or both sides of the page....
9
4288
by: DAHMB | last post by:
I have a Report in which I have one of the fields set up to launch a form with the On Click event. I would like to have the form launch and auto fill a field with the value of the field clicked in the report. For example in the report I click the name John Jones in the Name field, the form launches and I want the name John Jones entered in the Name field of the report. Any ideas So far I have this in the on click event of the field in the...
3
2461
by: JDubP | last post by:
I know a bit about VBA in Excel, but not about looping records in Access 2003, so any help will be appreciated. I think if someone can send me some sample code, I can muddle my way through. (or if you can send me alink to read how to do it that is fine also) I presently run a macro that: 1) runs a query where User has to input a value for field and 2) prints/saves a report in snapshot view (i have to manually type in file name) I...
3
2628
by: bettyboo | last post by:
Hi I'm new to the forum and also a VERY new user of Access to develop databases. I'm building a DB for a driving instructor acquaintance, and he wants a button on the pupil data entry form which he can click to flag a pupil as "Do Not Rebook" (i.e. if they're a non-payer or something). Upon clicking the button, he wants a value to be recorded in the appropriate field in the table (so we can report on it later) and he also wants the...
0
8946
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8776
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
9236
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8186
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6735
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4550
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4809
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2724
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2180
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.