Im trying to load a form set by strType that displays CACID that is equal to strCACID and if there is no match then open a new entry. I have no problem loading the new entry part by its self but when i try to add the equal to part in nothing works. Thank you for your help
strType is selected from a drop down box wich has the same name as the table and form being called.
strScan is a string from a barcode scanner which the strCACID is taken from.
strType is selected from a drop down box wich has the same name as the table and form being called.
strScan is a string from a barcode scanner which the strCACID is taken from.
Code:
If strType.[CACID] = strCACID Then
strWhere = "(strType.[CACID] = strCACID)"
DoCmd.OpenForm strType, acNormal, , strWhere, acFormEdit
Else
DoCmd.OpenForm strType, acNormal, , , acFormAdd, acDialog, strScan
End If