I have code that selects a record from a PopUp Search Form which then sets a bound control for that record ([HighlightLine)] to True. It then sets conditional formatting based on that control for various other controls.
Conditional Formatting is Expression: "[HighlightLine] = True"
This works fine but only if I click directly onto a control with the formatting, i.e only when a control has focus, otherwise the controls Conditional Formatting does not apply.
Does Expression Formatting only apply when a control has focus or is there another setting somewhere?
Thanks
1 2294
This is the code I'm using. Is there anything in here that makes expression conditional formatting only work when the control has focus?
Any help would be great. -
Private Sub ViewCallLog_Click()
-
Dim rst As Recordset
-
Dim lngYellow As Long
-
-
lngYellow = RGB(255, 255, 0)
-
-
If CurrentProject.AllForms("FRMClaims").IsLoaded Then
-
DoCmd.Close acForm, "FRMClaims"
-
-
DoCmd.OpenForm "FRMClaims"
-
-
'Run query Set to False previous fields where HilightLine = True
-
DoCmd.SetWarnings False
-
DoCmd.OpenQuery "QYUpdateTBClaimsHighlightLine"
-
DoCmd.SetWarnings True
-
-
'Set focus to selected record
-
'Forms!FRMClaims.ClaimsDisplaySubForm.Form.CompleationStatusID.SetFocus
-
-
Set rst = Forms!FRMClaims.ClaimsDisplaySubForm.Form.RecordsetClone
-
-
rst.FindFirst "[ClaimID] = " & Me.ClaimID
-
-
Forms!FRMClaims.ClaimsDisplaySubForm.Form.Bookmark = rst.Bookmark
-
-
Forms!FRMClaims.ClaimsDisplaySubForm.Form.CompleationStatusID.SetFocus
-
-
rst.Close
-
-
Set rst = Nothing
-
-
-
'Set Feild on Table to true on record that has focus(as laid out above)
-
Forms!FRMClaims.ClaimsDisplaySubForm.Form.HighlightLine = True
-
-
'Remove Format Conditions
-
Forms!FRMClaims.ClaimsDisplaySubForm.Form.LearnerFullName.FormatConditions.Delete
-
Forms!FRMClaims.ClaimsDisplaySubForm.Form.AssessorID.FormatConditions.Delete
-
Forms!FRMClaims.ClaimsDisplaySubForm.Form.QualificationID.FormatConditions.Delete
-
Forms!FRMClaims.ClaimsDisplaySubForm.Form.Level.FormatConditions.Delete
-
Forms!FRMClaims.ClaimsDisplaySubForm.Form.EmployerID.FormatConditions.Delete
-
Forms!FRMClaims.ClaimsDisplaySubForm.Form.FundingStreamID.FormatConditions.Delete
-
Forms!FRMClaims.ClaimsDisplaySubForm.Form.StartDate.FormatConditions.Delete
-
Forms!FRMClaims.ClaimsDisplaySubForm.Form.PlannedEndDate.FormatConditions.Delete
-
Forms!FRMClaims.ClaimsDisplaySubForm.Form.ActualEndDate.FormatConditions.Delete
-
-
'Add Format Conditions
-
Set objFrc = Forms!FRMClaims.ClaimsDisplaySubForm.Form.LearnerFullName.FormatConditions.ADD(acExpression, , "[HighlightLine] = True")
-
Set objFrc = Forms!FRMClaims.ClaimsDisplaySubForm.Form.LearnerFullName.FormatConditions.ADD(acExpression, , "[HighlightLine] = True")
-
Set objFrc = Forms!FRMClaims.ClaimsDisplaySubForm.Form.AssessorID.FormatConditions.ADD(acExpression, , "[HighlightLine] = True")
-
Set objFrc = Forms!FRMClaims.ClaimsDisplaySubForm.Form.QualificationID.FormatConditions.ADD(acExpression, , "[HighlightLine] = True")
-
Set objFrc = Forms!FRMClaims.ClaimsDisplaySubForm.Form.Level.FormatConditions.ADD(acExpression, , "[HighlightLine] = True")
-
Set objFrc = Forms!FRMClaims.ClaimsDisplaySubForm.Form.EmployerID.FormatConditions.ADD(acExpression, , "[HighlightLine] = True")
-
Set objFrc = Forms!FRMClaims.ClaimsDisplaySubForm.Form.FundingStreamID.FormatConditions.ADD(acExpression, , "[HighlightLine] = True")
-
Set objFrc = Forms!FRMClaims.ClaimsDisplaySubForm.Form.StartDate.FormatConditions.ADD(acExpression, , "[HighlightLine] = True")
-
Set objFrc = Forms!FRMClaims.ClaimsDisplaySubForm.Form.PlannedEndDate.FormatConditions.ADD(acExpression, , "[HighlightLine] = True")
-
Set objFrc = Forms!FRMClaims.ClaimsDisplaySubForm.Form.ActualEndDate.FormatConditions.ADD(acExpression, , "[HighlightLine] = True")
-
'Set Format Conditions
-
Forms!FRMClaims.ClaimsDisplaySubForm.Form.LearnerFullName.FormatConditions(0).BackColor = lngYellow
-
Forms!FRMClaims.ClaimsDisplaySubForm.Form.AssessorID.FormatConditions(0).BackColor = lngYellow
-
Forms!FRMClaims.ClaimsDisplaySubForm.Form.QualificationID.FormatConditions(0).BackColor = lngYellow
-
Forms!FRMClaims.ClaimsDisplaySubForm.Form.Level.FormatConditions(0).BackColor = lngYellow
-
Forms!FRMClaims.ClaimsDisplaySubForm.Form.EmployerID.FormatConditions(0).BackColor = lngYellow
-
Forms!FRMClaims.ClaimsDisplaySubForm.Form.FundingStreamID.FormatConditions(0).BackColor = lngYellow
-
Forms!FRMClaims.ClaimsDisplaySubForm.Form.StartDate.FormatConditions(0).BackColor = lngYellow
-
Forms!FRMClaims.ClaimsDisplaySubForm.Form.PlannedEndDate.FormatConditions(0).BackColor = lngYellow
-
Forms!FRMClaims.ClaimsDisplaySubForm.Form.ActualEndDate.FormatConditions(0).BackColor = lngYellow
-
-
End If
-
-
If CurrentProject.AllForms("FRMHome").IsLoaded Then
-
MsgBox ("FRMHome IsLoaded")
-
DoCmd.Close acForm, "FRMHome"
-
DoCmd.OpenForm "FRMCallLog", , , "[ClaimID] =" & Me.ClaimID
-
End If
-
-
If CurrentProject.AllForms("FRMLearnersDetails").IsLoaded Then
-
DoCmd.Close acForm, "FRMLearnersDetails"
-
DoCmd.OpenForm "FRMCallLog", , , "[ClaimID] =" & Me.ClaimID
-
End If
-
-
DoCmd.Close acForm, "FRMBasicLearnerSearch"
-
-
End Sub
-
-
Sign in to post your reply or Sign up for a free account.
Similar topics
by: pigeon |
last post by:
SSL only works when ms sql server has "force encryption option"
turned on...
If I turn that off, and try to have the client software request
encryption.. I get a ssl security error msg.
The...
|
by: Andy Stevenson |
last post by:
Hi,
As subject, I have the following JS in my HTML document & it works fine:
<SCRIPT type="text/JavaScript">
<!--
COPYRIGHT = " : Copyright © Diverse Arts., 2003-";
function...
|
by: Tim |
last post by:
hi,
I have some code that works in all web browsers except IE 5.2 for Mac
(heard this one before? :-)
the CSS code basically creates two id's, one is a container for the
other. eg:
CSS...
|
by: Daniel Beardsley |
last post by:
I have a div with some text in it and an onclick event. The onclick
event only seems to fire when the user clicks the text.. not if they
click the blank part of the div. This is in IE 6.
The...
|
by: Ethan Strauss |
last post by:
Hi,
I have a C#.net Web application which calls a web service
(http://eutils.ncbi.nlm.nih.gov/entrez/eutils/soap/eutils.wsdl). It has run
just fine for months. Recently I started getting...
|
by: Wessman |
last post by:
sending mail using function mail() only works when I'm connected to
mysql.
<?
mail($to, $subject, "before mysql_connect()", "From: $from");
mysql_connect("localhost", $username, $password);...
|
by: Ted |
last post by:
In MS SQL I used the following to create a stored procedure.
USE AdventureWorks;
GO
IF OBJECT_ID ( 'HumanResources.usp_My_Search', 'P' ) IS NOT NULL
DROP PROCEDURE HumanResources.usp_My_Search;...
|
by: clentoc |
last post by:
I'm pretty new to javascript so this may well be a really basic error, but I've spent hours trying to fix it with no joy.
I have written some code which looks in a CSV file, filters it depending...
|
by: shuu |
last post by:
Hi
I have a application that captures the screen och sends the images to a server.
I want to save the destination URL's (like: http://domain.com/dump/img.jpg) to the clipboard, but this only...
|
by: postman |
last post by:
Any idea why code would work as intended when setting a breakpoint and stepping through it line by line, but won't work correctly at run-time?
The code is too much to post, so I hope this summary...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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$) {
}
...
|
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...
|
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
|
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...
|
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...
|
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: 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...
|
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,...
| |