DLookup in Conditional Formatting?

  • Thread starter Thread starter croy
  • Start date Start date
C

croy

Will conditional formatting (Access 2002) allow the use of
DLookup?

I've been hammering on such a thing all morning, and can't
seem to find the right stroke.

Here's one of my tries:

Expression is...
DLookUp("[FishCountId]","[tblFishCount]","[IvDetId]=" &
me![txtIvDetId])

Any thoughts?
 
Don't think that is possible...I've never done it anyway.

What are you trying to do, highlight records in a continuous form?
If so, there is another way to do it...

Steve
 
It can be done, but your expression does not evaluate to anything. for
example you might try:
DLookUp("[FishCountId]","[tblFishCount]","[IvDetId]=" & me![txtIvDetId]) IS
NUll
for example.
 
Don't think that is possible...I've never done it anyway.

What are you trying to do, highlight records in a continuous form?

Yup!


If so, there is another way to do it...


I've got two popup forms called from buttons on the rows of
a continuous subform.

With Marshall Barton's help, over in forms.coding, I've been
trying to get textboxes to look like buttons, but change
color when the forms that they would pop up have one or more
records for the current subform record. When I add one of
the tables that would feed one of the popups, and give it an
outer join, all is well. But when I add the second table
into the frey, the subform won't let me add any records. I
really don't want to have a separate form for edits or a
whole bunch more code than I can remember what it's for...),
if I can avoid it. It wouold be very nice for the
data-entry folks and for the checkers, to be able to see on
the form/subform which records already have data that would
show in the popups.

Outside of that route, I've been trying to get DLookup to do
something for me. First, I it in the conditional formatting
boxes, then I tried in the RecordSource for the "buttons".
But either I'm not getting the syntax right, or I'm trying
to do things that are out of logic.
 
It can be done, but your expression does not evaluate to anything. for
example you might try:
DLookUp("[FishCountId]","[tblFishCount]","[IvDetId]=" & me![txtIvDetId]) IS
NUll
for example.


Aha! I actually tried that in one of my zillions of "try
this" attempts, but probably had the rest of it hosed in
some fashion.

Another thought I had was to put the DLookup in the
RecordSource for the textbox masquerading as a
commandbutton, and then do the conitional formatting on the
results. Somehow, that seems a little cleaner to me, but my
poor memory for syntax (and much else) has me mired in the
muck.

Thanks for the hint!
 
Back
Top