Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 33
  • Last Modified:

How hide #Error in a form field

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
SteveL13
Asked:
SteveL13
1 Solution
 
Rey Obrero (Capricorn1)Commented:
try using the NZ() function

=DMax("[CurrentMeterRead]","tblDaySheets","[VehicleUsedID] = " & nz([Forms]![frmDaySheet]![cboVehicleUsedID],0))
0
 
SteveL13Author Commented:
That did it.  Thank you.
0

Featured Post

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Tackle projects and never again get stuck behind a technical roadblock.
Join Now