I have an Access form with a textbox that is uses as an expression as it’s controlsource to calculate a value to display. While the below expression works fine in Access 2003, it doesn’t display in Access 2007 automatically. Only when I click on the field, does the value display. What is does is it checks the database for a value based on other fields on the form. If its NULL, the field displays a “N/A”. If it’s not NULL, it displays the value found in the database.
Does anyone know what I might be doing wrong?
=IIf
(
IsNull( DLookUp("SomeField","SomeTable","SomeField = Forms!frm_FormName!cboSomeCombobox")),
"N/A",
LookUp("SomeField","SomeTable","SomeField = Forms!frm_FormName!cboSomeCombobox")
)
Issues that are fixed in Access 2007 by the 2007 Microsoft Office suites Service Pack 1
http://support.microsoft.com/kb/942378