473,378 Members | 1,330 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,378 software developers and data experts.

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 13075
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.Requery). Also, have you tried to
requery the control directly? For example, using an AfterUpdate event from
the main form, do something like:

Me.SubForm!Sales.Requery
mi********@gmail.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.com
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.com 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.Requery). Also, have you tried to
requery the control directly? For example, using an AfterUpdate event from
the main form, do something like:

Me.SubForm!Sales.Requery
mi********@gmail.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.com
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********@gmail.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.com
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********@gmail.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
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...
8
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...
3
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...
5
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...
0
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
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...
7
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...
1
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...
2
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...
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...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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...

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.