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 Programming / August 2005

Tip: Looking for answers? Try searching our database.

Which event would be best

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Dylan Moran - 05 Aug 2005 07:13 GMT
I have submitted fields and assessed fields on a form.
I want to code such that if an assessed field is not equal to the submitted
field, I would like the assessed field to be bolded and red.

Q1: Which event would be best to put this code in?

Request 2: Some assistance with the formatting code would also be great if
you have the time.

My Form is like below

Submitted              Assessed

150.00                    150.00
100.00                      90.00    (I want the 90.00 to be bolded and red).

----------                 ---------
250.00                   240.00     (I want the 240.00 to be bolded and red).

Many thanks for any assistance.
Dylan Moran - Melbourne Australia
Wayne Morgan - 05 Aug 2005 07:25 GMT
If you have Access 2002 (XP) or 2003, the best option isn't an event. In
form design view, right click the control, choose Conditional Formatting, in
the drop down choose Expression, fill in the expression, and set the desired
items.

If you have an older version of Access, you will need to put code in the
form's Current event to check the values each time you go to a different
record and in the AfterUpdate event of each of the controls to check the
values when one of the controls changes.

The syntax for the formatting:
Me.txtAssessed.ForeColor = vbRed
Me.txtAssessed.FontBold = True

Signature

Wayne Morgan
MS Access MVP

>I have submitted fields and assessed fields on a form.
> I want to code such that if an assessed field is not equal to the
[quoted text clipped - 20 lines]
> Many thanks for any assistance.
> Dylan Moran - Melbourne Australia
Dylan Moran - 05 Aug 2005 07:40 GMT
Superb. Thanks very much.
Dylan

> If you have Access 2002 (XP) or 2003, the best option isn't an event. In
> form design view, right click the control, choose Conditional Formatting, in
[quoted text clipped - 34 lines]
> > Many thanks for any assistance.
> > Dylan Moran - Melbourne Australia
Klatuu - 05 Aug 2005 14:34 GMT
Conditional Formatting is also available in 2K

> If you have Access 2002 (XP) or 2003, the best option isn't an event. In
> form design view, right click the control, choose Conditional Formatting, in
[quoted text clipped - 34 lines]
> > Many thanks for any assistance.
> > Dylan Moran - Melbourne Australia
 
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.