?
Solved

Another isnull syntax issue

Posted on 2014-12-17
2
Medium Priority
?
116 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

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Question has a verified solution.

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

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
Suggested Courses

762 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