Solved

How hide #Error in a form field

Posted on 2016-11-26
2
26 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
[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 120

Accepted Solution

by:
Rey Obrero (Capricorn1) 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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

Suggested Solutions

It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
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 …

735 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