K
Kirk P.
I've got this code in the RowSource property of a combo box called cboLocale.
It restricts the choices in Locale based on the users selection in
cboSite_ID.
SELECT DISTINCT LOCALE, CLIENT_ID
FROM tblSales_MTD
WHERE
(((CLIENT_ID)=[Forms]![frmADM_Assign]![sfrmADM_Assign].[Form]![cboSite_ID]));
The problem is, in the On Exit event of cboLocale, I have this code:
If IsNull(Me.cboLocale) Then
Cancel = True
With Me![cboLocale]
.Requery
.SetFocus
.Dropdown
End With
MsgBox "You must select a locale!", vbCritical, "Error Notice"
End If
In many cases, the value in Locale is appropriate when it is a zero length
string, and the combo box in Locale will correctly display a "blank" when
that is the appropriate choice. I have verified the fact that the select
query serving as the RowSource for Locale does not return Nulls, but it
appears the code in the Exit event still interprets the zero length strings
as Nulls, thus firing the error and not even allowing me to enter a space or
anything.
It restricts the choices in Locale based on the users selection in
cboSite_ID.
SELECT DISTINCT LOCALE, CLIENT_ID
FROM tblSales_MTD
WHERE
(((CLIENT_ID)=[Forms]![frmADM_Assign]![sfrmADM_Assign].[Form]![cboSite_ID]));
The problem is, in the On Exit event of cboLocale, I have this code:
If IsNull(Me.cboLocale) Then
Cancel = True
With Me![cboLocale]
.Requery
.SetFocus
.Dropdown
End With
MsgBox "You must select a locale!", vbCritical, "Error Notice"
End If
In many cases, the value in Locale is appropriate when it is a zero length
string, and the combo box in Locale will correctly display a "blank" when
that is the appropriate choice. I have verified the fact that the select
query serving as the RowSource for Locale does not return Nulls, but it
appears the code in the Exit event still interprets the zero length strings
as Nulls, thus firing the error and not even allowing me to enter a space or
anything.