hello guys i want to check if the number and the date of telegram is existed
the number should be LIKE not equal
the date should be equal
this is what i wrote
this code is working if the number and date is equal for example
if number = 12 and date = 01/01/2015
and i enter number = 12 and date = 01/01/2015
so i got a msg "number existed
but if number = 12 - 50 and date = 01/01/2015
and i enter number = 12 and date = 01/01/2015
i got nothing
any help??
the number should be LIKE not equal
the date should be equal
this is what i wrote
Code:
If DLookup("Telegram_Number", "tbl_Violation_Of_Building", "Telegram_Number Like " + Forms!frm_Add_Violation_Building!Telegram_Number + " And Telegram_Date = #" & Format(Forms!frm_Add_Violation_Building!Telegram_Date, "yyyy/mm/dd") & "#") Then
MsgBox ("number existed")
Me.Telegram_Date = Null
Me.Telegram_Number = Null
Me.Telegram_Number.SetFocus
End If
this code is working if the number and date is equal for example
if number = 12 and date = 01/01/2015
and i enter number = 12 and date = 01/01/2015
so i got a msg "number existed
but if number = 12 - 50 and date = 01/01/2015
and i enter number = 12 and date = 01/01/2015
i got nothing
any help??