Errors of Forms

wllsth

Registered User.
Local time
Today, 12:57
Joined
Sep 17, 2008
Messages
81
I have created a Form which has 5 fields in it. One of the fields (Rate) is based on a DLookup from data in a Combo Box which is Field 1. When I open up the form to enter a new record i get #Error in the field (Rate) because it obviously has got no value in the Combo Box. How do I stop this error message. Any help would be appreciated
 
Use the Nz function around each item to handle nulls:

Nz([YourComboBox],0)
 
I have created a Form which has 5 fields in it. One of the fields (Rate) is based on a DLookup from data in a Combo Box which is Field 1. When I open up the form to enter a new record i get #Error in the field (Rate) because it obviously has got no value in the Combo Box. How do I stop this error message. Any help would be appreciated

As you pointed out, the #Error message can occur when Access finds no value in the Combo Box. The only way to eliminate the error, is to provide a value in the event that there is none found. This can be done by using one of the following two choices:
  • Modifying the query that the Combo Box is based on to provide a value (LEFT OUTER JOIN, etc)
  • Setting a default value for the Combo Box
Perhaps there are other options as well, but these two choices will get you started and should handle most of the cases that you will encounter.
 

Users who are viewing this thread

Back
Top Bottom