A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

DLookup in Conditional Formatting?



 
 
Thread Tools Display Modes
  #1  
Old October 30th, 2007, 07:25 PM posted to microsoft.public.access.forms
croy
external usenet poster
 
Posts: 160
Default DLookup in Conditional Formatting?

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
  #2  
Old October 30th, 2007, 08:02 PM posted to microsoft.public.access.forms
SteveM
external usenet poster
 
Posts: 383
Default DLookup in Conditional Formatting?

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

  #3  
Old October 30th, 2007, 09:00 PM posted to microsoft.public.access.forms
Klatuu
external usenet poster
 
Posts: 7,074
Default DLookup in Conditional Formatting?

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

  #4  
Old October 30th, 2007, 09:14 PM posted to microsoft.public.access.forms
croy
external usenet poster
 
Posts: 160
Default DLookup in Conditional Formatting?

On Tue, 30 Oct 2007 13:02:03 -0700, SteveM
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
  #5  
Old October 30th, 2007, 09:22 PM posted to microsoft.public.access.forms
croy
external usenet poster
 
Posts: 160
Default DLookup in Conditional Formatting?

On Tue, 30 Oct 2007 14:00:02 -0700, Klatuu
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
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 06:59 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.