Hello everyone,
I have a Form (ITEMS) where it's also possible to insert
the supplier name of a particular item. I'm trying to use a macro to check if
the supplier name registered in the form ITEMS already exists in the table
"Suppliers". If it doesn't, then tha macro should show a message to ask to the
user if he/she wants to update the "suppliers" table with the info of the new
supplier.
I saw on the web that I can use as conditional expression in
the macro the commands IsNull(DlookUp... etc.
however I'm having difficulties to
make this command works..
the syntax that I'm using is the following :
IsNull(DLookUp("[Supplier Name]","Suppliers","[Supplier Name]='" &
[Forms]![ITEMS]![SupplierName] & "'"))
Basically in the command I
want to say: "look for the "Supplier Name" in the table "Suppliers" that is
equal to the "SupplierName" of the form ITEMS just added. And tell me if you
find it.
but apparently there is something wrong in the syntax because
when I try to updade the SupplierName in the form ITEMS it gives me as message
"type mismatch".
I hope you guys can help me to solve this problem