473,724 Members | 2,248 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Conditional Formatting and Refresh / Requery

Hello,
I have conditional formatting set up on a subform based on a calculated
value in the underlying query. For instance, if Sales are >$1000, the
query displays "Yes," otherwise it displays "No." The conditional
formatting is set up to read the 'Yes' or 'No' value and color the text
accordingly.

I have an event in the subform that allows users to update the sales.
It actually runs an update query behind the scenes. What I want to
happen is for the formatting to pick up the value immediately and
change color. I can requery the subform, but that loses my place in the
form. And refresh doesn't seem to trigger the conditional formatting to
check for the values.

Is there any way to refresh conditional formatting on the fly?

Nov 13 '06 #1
4 13189
It sounds like the subform isn't refreshing after an update in the main form.
Is this the behavior that you're trying to achieve? It's not clear how
you've implemented this; you should be able to requery the subform without
affecting your main form (Me.SubForm.Req uery). Also, have you tried to
requery the control directly? For example, using an AfterUpdate event from
the main form, do something like:

Me.SubForm!Sale s.Requery
mi********@gmai l.com wrote:
>Hello,
I have conditional formatting set up on a subform based on a calculated
value in the underlying query. For instance, if Sales are >$1000, the
query displays "Yes," otherwise it displays "No." The conditional
formatting is set up to read the 'Yes' or 'No' value and color the text
accordingly.

I have an event in the subform that allows users to update the sales.
It actually runs an update query behind the scenes. What I want to
happen is for the formatting to pick up the value immediately and
change color. I can requery the subform, but that loses my place in the
form. And refresh doesn't seem to trigger the conditional formatting to
check for the values.

Is there any way to refresh conditional formatting on the fly?
--
Message posted via AccessMonster.c om
http://www.accessmonster.com/Uwe/For...ccess/200611/1

Nov 13 '06 #2

The subform is not connected to the main form. It's just a set of
records. That's why I use the update query to update those records.
The requery and refresh actions I've used are fired 'After Update.'
kingston via AccessMonster.c om wrote:
It sounds like the subform isn't refreshing after an update in the main form.
Is this the behavior that you're trying to achieve? It's not clear how
you've implemented this; you should be able to requery the subform without
affecting your main form (Me.SubForm.Req uery). Also, have you tried to
requery the control directly? For example, using an AfterUpdate event from
the main form, do something like:

Me.SubForm!Sale s.Requery
mi********@gmai l.com wrote:
Hello,
I have conditional formatting set up on a subform based on a calculated
value in the underlying query. For instance, if Sales are >$1000, the
query displays "Yes," otherwise it displays "No." The conditional
formatting is set up to read the 'Yes' or 'No' value and color the text
accordingly.

I have an event in the subform that allows users to update the sales.
It actually runs an update query behind the scenes. What I want to
happen is for the formatting to pick up the value immediately and
change color. I can requery the subform, but that loses my place in the
form. And refresh doesn't seem to trigger the conditional formatting to
check for the values.

Is there any way to refresh conditional formatting on the fly?

--
Message posted via AccessMonster.c om
http://www.accessmonster.com/Uwe/For...ccess/200611/1
Nov 13 '06 #3
What do you mean by it's just a set of records? How are you displaying the
data (exposing the table? opening a query? opening a separate form? opening a
report?) The word subform has a specific meaning in Access and it doesn't
sound like you really have a subform. You'll have to go into more detail
about your implementation and what you want to achieve. For example, did you
try a subform (as defined by Access) and decide to do something else because
you didn't want things to work that way?
If you're refreshing a separate form and losing your place, is there an id
that you can use to find your place again after the refresh?

mi********@gmai l.com wrote:
>The subform is not connected to the main form. It's just a set of
records. That's why I use the update query to update those records.
The requery and refresh actions I've used are fired 'After Update.'
>It sounds like the subform isn't refreshing after an update in the main form.
Is this the behavior that you're trying to achieve? It's not clear how
[quoted text clipped - 24 lines]
>Message posted via AccessMonster.c om
http://www.accessmonster.com/Uwe/For...ccess/200611/1
--
Message posted via http://www.accessmonster.com

Nov 13 '06 #4
You need to use recalc to trigger a refresh of Conditional formatting.

This example demonstrating row highlighting may be of help:

http://www.kerkeslager.net/Darryl/Ac...Highlight.html

--
Darryl Kerkeslager
<mi********@gma il.comwrote
I have conditional formatting set up on a subform based on a calculated
value in the underlying query. For instance, if Sales are >$1000, the
query displays "Yes," otherwise it displays "No." The conditional
formatting is set up to read the 'Yes' or 'No' value and color the text
accordingly.

I have an event in the subform that allows users to update the sales.
It actually runs an update query behind the scenes. What I want to
happen is for the formatting to pick up the value immediately and
change color. I can requery the subform, but that loses my place in the
form. And refresh doesn't seem to trigger the conditional formatting to
check for the values.

Is there any way to refresh conditional formatting on the fly?

Nov 13 '06 #5

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

Similar topics

4
3136
by: Bradley | last post by:
I have an A2000 database in which I have a continuous form with a tick box. There is also a text box with a conditional format that is based on the expression , if it's true then change the background colour. In A2000 it works great, but in A2003 the background doesn't always change and when it does it only changes when the record looses the focus. Any way around this? Is it a bug? Or have they "improved" it?
8
12051
by: Dimitri Furman | last post by:
Given: Access 2002/2003 A subform in datasheet or continuous view, placed on a tab page (this last may or may not matter) Conditional formatting applied to some controls on the subform - format expressions are the same for all controls Under some undetermined circumstances, when such subform is displayed, the controls on the subform start to visibly flicker, the cursor in the subform stops blinking, and CPU utilization goes to 100%....
3
1726
by: HateSpam | last post by:
I have a field on a form which shows a field with conditional formatting. From this form, it is possible to open another form where the user can update things which will affect the field with the formatting. When this second form closes, it calls a .Requery for the first form. The value in the formatted field updates, but it's formatting does not. What else do I need to do?
5
2494
by: Andrew Chanter | last post by:
I have a situation where I am using an unbound dialog form to update data in an Access 2002 split back end / front end scenario. The data update is done via an ADO call (direct to the back end db) when the user clicks the save button. The dialog then closes and the user should be able to see the result of their edit in a list view that now has focus. This is where I run into a problem. The list view wont refresh to pick up the data...
0
657
by: GGerard | last post by:
Hello With MSAccess 2000, I have created a program with forms and applied some Conditional Formatting on some of the text box.
1
2357
by: HJ | last post by:
In Access 2000 (ServiceRelease 1) I have a subform in Datasheet view. On one field I have applied conditional formatting: the back color is set to red, based on some condition. The problem is that the red back color is not shown when I open the form. Only when I move the mouse over the column, the red color is shown (if applicable). Why is this happening and how can I solve it?
7
2090
by: Andy_Khosravi | last post by:
I use the formatting trick in A97 to simulate conditional formatting in continuous forms. It has, up to this point, worked fine. Today I was making some design changes to the parent form (the continuous form is a sub form within this parent form) when the formatting trick I was using stopped working. What's happening is that the character I use to 'block over' fields and make them appear to be invisible stopped displaying a solid bar...
1
2097
by: DAObermeyer | last post by:
Hey all, first time here. I have a database that is designed to be opened and viewed at other locations on the network. I use Form (A) to modify Data in Table (A), and Form (B) is used scrictly to view. Now It works great and updates every 10 seconds with a form.requery on a timer event. Now This display is to give Scheduled and Actual times. As times are posted, I use Conditional formatting to change the colors reflecting on...
2
3310
by: robertng90025 | last post by:
I'm having a problem with MS Access 2003 and its conditional formatting. I have textboxes on a continuous form whose left and right margins are set to 0.03 inches. Based on each textbox's current value, I set its background color. No problem with this part. My problem is that when clicking different text boxes representing the records on the continuous form, the left and the right margin areas do not always take on the background...
0
8868
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
9241
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9160
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
9090
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
4504
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
4764
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3209
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2612
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2149
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.