Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Another isnull syntax issue

Posted on 2014-12-17
2
Medium Priority
?
117 Views
Last Modified: 2014-12-17
I am getting #Error on a form using this control source syntax:

=IIf(IsNull([txtDayOfWeek]),"",DLookUp("[DayOfWeek]","tblFacilities","[ID] = " & [Forms]![frmPatientVisitsNew]![txtFacilityID]))


???
0
Comment
Question by:SteveL13
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 58

Accepted Solution

by:
Jim Dettman (Microsoft MVP/ EE MVE) earned 2000 total points
ID: 40505132
Steve,

 Need:

=IIf(IsNull(Me.[txtDayOfWeek]),"",DLookUp("[DayOfWeek]","tblFacilities","[ID] = " & [Forms]![frmPatientVisitsNew]![txtFacilityID]))

 or depending on where your using this, a full form reference like you have for the Facility ID ([Forms]![<form name>]![<control or field name>]

Jim
0
 

Author Comment

by:SteveL13
ID: 40505142
That did it.  

=IIf(IsNull(Me.[txtDayOfWeek]),"",DLookUp("[DayOfWeek]","tblFacilities","[ID] = " & [Forms]![frmPatientVisitsNew]![txtFacilityID]))

Thanks.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question