English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I'm pulling standards from one table...low is [text64] and high is [text66]. From a different table I’m pulling the actual reading [spec1].

If [spec1] falls between [text64] and [text66] I want nothing to happen...should it fall outside of that span I want the background of the box [spec1] to turn red leaving the numbers in it, just changing the background...perhaps even turning the numbers to bold print.

In the control source for [spec1] I’ve used this expression

=IIf([spec1] Between [Text64] And [Text66],
[spec1].BackColor65280,
[spec1].BackColor255)

This doesn’t work....what should I be doing to make this happen?

2006-12-28 07:41:58 · 2 answers · asked by Lardo 1 in Computers & Internet Programming & Design

2 answers

First of all, why in any gods name are you developing in Access?
Get a real programming language and link to an Access database, if you have to.

Anyway, there is obviously something wrong with [spec1] and its' relationship to [Text64] and [Text66].
is spec1 the same data type as [Text64] and [Text66]?
is the "iif" statement evaluating the "between" statement as expected?
is the "between" statement being used correctly?

2006-12-28 07:48:51 · answer #1 · answered by timc_fla 5 · 0 1

Try this. I think the error is in your IIF formula:

=IIF([spec1]>=[Text64],[spec1].BackColor65280,IIF([spec1]<=[Text66],[spec1].BackColor65280,[spec1].BackColor255))

2006-12-28 15:55:24 · answer #2 · answered by Anonymous · 0 0

fedest.com, questions and answers