G
Gitche Gumee
The following code works fine when I am navigating from record to record.
On Current:
If Not IsNull(Forms!frmMain![frm Project
Information]![tblProjectProductGroupJctn subform1]!ProductGroupIDJctn) Then
Me.cboProductGroupFunction = DLookup("ProductGroupFunction",
"tblProductGroupFunction", "ProductGroupID = " & Forms!frmMain![frm Project
Information]![tblProjectProductGroupJctn subform1]!ProductGroupIDJctn)
Me.cboProduct = DLookup("Product", "tblProductGroupFunction",
"ProductGroupID = " & Forms!frmMain![frm Project
Information]![tblProjectProductGroupJctn subform1]!ProductGroupIDJctn)
Else
Me.cboProductGroupFunction = ""
Me.cboProduct = ""
End If
However, if I open a form to add a new record and then close it, I get the
following error:
Run-Time Error 2455: You entered an expression that has an invalid reference
to the property Form/Report.
The first line ("If....Then") is highlighted.
If I click "End" instead of "Debug" the form appears and functions normally.
What's the problem?
On Current:
If Not IsNull(Forms!frmMain![frm Project
Information]![tblProjectProductGroupJctn subform1]!ProductGroupIDJctn) Then
Me.cboProductGroupFunction = DLookup("ProductGroupFunction",
"tblProductGroupFunction", "ProductGroupID = " & Forms!frmMain![frm Project
Information]![tblProjectProductGroupJctn subform1]!ProductGroupIDJctn)
Me.cboProduct = DLookup("Product", "tblProductGroupFunction",
"ProductGroupID = " & Forms!frmMain![frm Project
Information]![tblProjectProductGroupJctn subform1]!ProductGroupIDJctn)
Else
Me.cboProductGroupFunction = ""
Me.cboProduct = ""
End If
However, if I open a form to add a new record and then close it, I get the
following error:
Run-Time Error 2455: You entered an expression that has an invalid reference
to the property Form/Report.
The first line ("If....Then") is highlighted.
If I click "End" instead of "Debug" the form appears and functions normally.
What's the problem?