Solved

How hide #Error in a form field

Posted on 2016-11-26
2
22 Views
Last Modified: 2016-11-26
I have this as the control source but am getting #Error if cboVehicleUsedID hasn't been selected from a combobox.

=DMax("[CurrentMeterRead]","tblDaySheets","[VehicleUsedID] = " & [Forms]![frmDaySheet]![cboVehicleUsedID])

How can I hide the #Error ???
0
Comment
Question by:SteveL13
2 Comments
 
LVL 119

Accepted Solution

by:
Rey Obrero earned 500 total points
ID: 41902414
try using the NZ() function

=DMax("[CurrentMeterRead]","tblDaySheets","[VehicleUsedID] = " & nz([Forms]![frmDaySheet]![cboVehicleUsedID],0))
0
 

Author Closing Comment

by:SteveL13
ID: 41902434
That did it.  Thank you.
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

910 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

24 Experts available now in Live!

Get 1:1 Help Now