DLookup in Conditional Formatting?

  • Follow


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?

-- 
Thanks,
croy
0
Reply croy 10/30/2007 7:25:51 PM

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

"croy" wrote:

> 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?
> 
> -- 
> Thanks,
> croy
> 
0
Reply Utf 10/30/2007 8:02:03 PM

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.
-- 
Dave Hargis, Microsoft Access MVP


"croy" wrote:

> 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?
> 
> -- 
> Thanks,
> croy
> 
0
Reply Utf 10/30/2007 9:00:02 PM

On Tue, 30 Oct 2007 13:02:03 -0700, SteveM
<SteveM@discussions.microsoft.com> wrote:

>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.

-- 
croy
0
Reply croy 10/30/2007 9:14:48 PM

On Tue, 30 Oct 2007 14:00:02 -0700, Klatuu
<Klatuu@discussions.microsoft.com> wrote:

>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!

-- 
croy
0
Reply croy 10/30/2007 9:22:00 PM

4 Replies
605 Views

(page loaded in 0.078 seconds)

Similiar Articles:
















7/20/2012 8:53:17 PM


Reply: