Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / October 2007

Tip: Looking for answers? Try searching our database.

DLookup in Conditional Formatting?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
croy - 30 Oct 2007 20:25 GMT
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?

Signature

Thanks,
croy

SteveM - 30 Oct 2007 21:02 GMT
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

> Will conditional formatting (Access 2002) allow the use of
> DLookup?
[quoted text clipped - 9 lines]
>
> Any thoughts?
croy - 30 Oct 2007 22:14 GMT
>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.

Signature

croy

Klatuu - 30 Oct 2007 22:00 GMT
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.
Signature

Dave Hargis, Microsoft Access MVP

> Will conditional formatting (Access 2002) allow the use of
> DLookup?
[quoted text clipped - 9 lines]
>
> Any thoughts?
croy - 30 Oct 2007 22:22 GMT
>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!

Signature

croy

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.