Solved

Another isnull syntax issue

Posted on 2014-12-17
2
109 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
2 Comments
 
LVL 57

Accepted Solution

by:
Jim Dettman (Microsoft MVP/ EE MVE) earned 500 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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

In Debugging – Part 1, you learned the basics of the debugging process. You learned how to avoid bugs, as well as how to utilize the Immediate window in the debugging process. This article takes things to the next level by showing you how you can us…
Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

911 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now