Continuous Form - Conditional Format

EliteDesk@aol.com

Registered User.
Local time
Today, 12:02
Joined
Sep 11, 2000
Messages
45
:cool:
I have searched this great web site, and cannot find an answer to this. I would appreciate anyones help.

I have a continuous form listing up to 100 records, I need to use Conditional Formating via Access 2000, but confused on the syntax for Expression Is.

I want to change the color of the txt box If fkInspectorID is greater than the previous record of fkInspectorID. I hope that is enough information. Thank you in advance for your time. Cathi
 
Cathi,

The problem here is that the "previous record" has no context here.
What is the previous record? The last "current" record? Or the one
before the Current one in the recordset?

If this was a report, this would be easy, because the report writer
traverses the records in order. You can use the DetailFormat event
to keep track of the last record.

In a form's context however, you might not have even been to the
previous record.

In the fkInspectorID field, you can choose conditional formatting.
Set the three fields as below:

Field Value Is -- Greater Than -- SomeFunction

Then create a Public Function:

Code:
Public Function SomeFunction () As String
  "Clone" the form's recordset.
  Retrieve the form's current position in the recordset.
  Then move to previous record in the recordset.
  Return the value of the field in question.
End Function

A bit of work, but that's the only way that I see it being done.

Wayne
 
Cathi,

Couldn't resist.

Attached is a start for what you want.

Wayne
 

Attachments

Thanks

Wayne,
Thank you, I will take a look at it! I really appreciate you taking the time to help me. Cathi
 
Thank you again!

Wayne,
:) :) :) :) :

A a ton of bricks just fell off my shoulders! It is exactly what I needed. Cathi
 

Users who are viewing this thread

Back
Top Bottom