Firstly, my apologies for postong the same message over, i got an error and
assumed that the message didn't save.
Second, Klatuu....
your code works fine, thank you. just one problem tho.....
if i enter the MISISDN without the prefix, it populates the first message
"ADD Prefix 27", when i click OK, it filters the record for a Similar MSISDN.
and ignores the second message "invalid length"
This is what i have...
Private Sub Command23_Click()
If Left(Me.MSISDNHEAD, 2) <> "27" Then
MsgBox "Please enter MSISDN as 27*****", vbCritical + vbOKOnly, "1065
Live"
Me.MSISDNHEAD.SetFocus
ElseIf Len(Me.MSISDNHEAD) < 13 Then
MsgBox "MSISDN should be 11 digits, please check and re-enter",
vbCritical = vbOKOnly, "Invalid Entry"
Me.MSISDNHEAD.SetFocus
ElseIf Me.DupUT = 0 Then
If DCount("[Date]", "UnresolvedQueries",
"[MSISDN]=Forms![LOgger1]![MSISDNHEAD]") <> 0 Then
MsgBox "There is one or more open queries for this MSISDN. These will be
displayed now. If you want to open another event for this MSISDN click GO
again.", vbCritical, "1065"
Me.DupUT = 1
DoCmd.OpenForm "Query"
Forms![Query]![TXTSearch] = Me.MSISDNHEAD
Forms![Query].RecordSource = "LogFilterMSISDN"
Exit Sub
End If