All sorts of things have been changed here.
The error that occurs is because variables are not declared. If you use "option explicit", you must declare each variable. For example
Code:
Dim strMsg as String
For my convenience, I have removed "option explicit". The next error that occurs is that "t01EntityFeature" does not exist in the DLookup. That's right, because there is a s missing.
I have also corrected that error. Then I got stuck on the following error again. In the DLookup, look you for a record where "EntFtrID" is equal to the value you chose in the combo box. However, that field does not exist ("EntfeaID" does exist). There is als a p missing in "ApearanceA"
At this point I just stopped. You can't expect that if you make such a mess of it, we'll correct it for you.
Code:
Option Compare Database
Option Explicit
Dim Temp As String
Private Sub cboEntFea_AfterUpdate()
If Not Me.cboEntFea.Value = Temp Then
If DLookup("ApearanceA", "t01EntityFeature", "EntFtrID=" & Me.cboEntFea.Value) = "Once" Then
If Not IsNull(DLookup("CmbEntIDa", "t01CombinedEntities", "Entfea_IDa =" & Me.cboEntFea.Value)) Then
strMsg = "Entity Feature is already in use by " & DLookup("EntityNameA", "t01CombinedEntities", "Entfea_IDa=" & Me.cboEntFea.Value)
Me!EntFtr_ID015.Value = Temp
strTitle = "Select Entity Feature"
Ret_type = MsgBox(strMsg, vbOKOnly, strTitle)
End If
End If
End If
End Sub