473,324 Members | 2,313 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,324 software developers and data experts.

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 3003
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*********@feehally128.karoo.co.ukwrote in message
news:11**********************@b68g2000cwa.googlegr oups.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*********@feehally128.karoo.co.ukwrote in message
news:11**********************@b68g2000cwa.googlegr oups.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(Cancel 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*********@feehally128.karoo.co.ukwrote in message
news:11**********************@b68g2000cwa.googlegr oups.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(Cancel 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*********@feehally128.karoo.co.ukwrote in message
news:11**********************@b68g2000cwa.googlegr oups.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(Cancel 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
"feeman" <fe*********@feehally128.karoo.co.ukwrote in message
news:11**********************@b68g2000cwa.googlegr oups.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(Cancel 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.
Make sure the BackStyle property pf the TextBox is Normal and not Transparent.
If the latter the color won't make any difference.

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
Jul 4 '06 #11
Thanks Rick that was it, it was set to transparent. thanks for all
your help.

Jul 4 '06 #12

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

Similar topics

2
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...
2
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...
0
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...
2
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....
2
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...
9
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...
9
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...
3
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...
3
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...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.