Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / April 2008

Tip: Looking for answers? Try searching our database.

Conditional Formatting requiring Clicking twice to change records

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Linq Adams - 15 Apr 2008 13:34 GMT
Was writing a little routine for someone who needed, with a datasheet or
continuous form, to have FieldTwo's back color change when FieldOne has focus.
I added a boolean field, FFlag, and set it with the following code:

Private Sub FieldOne_GotFocus()
Me.FFlag = -1
End Sub

Private Sub FieldOne_LostFocus()
Me.FFlag = 0
End Sub

and then used Conditional Formatting for FieldTwo

Expression Is [FieldOne] = -1

with the back color set as desired.

This works as expected with one exception. If you move to another control
within the current record, everything works correctly. But if you try to move
to a different record with the mouse, the formatting disappears from FieldTwo,
but the cursor stays on the FieldOne of the current record! In order to go to
another record you have to click on it a second time!

I've tried everything I can think of, including recreating the scenario with
a new db, made from scratch, in case it was some weird type of corruption,
with no luck.

If the Conditional Formatting is removed, the form works as it normally would!

Anyone with any ideas?

Running Access 2003/SP2 on Windows XP

Thanks!

Linq
Linq Adams - 15 Apr 2008 18:52 GMT
Correction:

The Conditional Formatting is

Expression Is [FFlag] = -1

Signature

There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000/2003

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.