G
Guest
Hi,
I have below code in lost focus event.
****************************
Private Sub SSN_LostFocus()
Dim dbslog As Database, rstlog As Recordset, zsql As String, App As String
Set dbslog = CurrentDb
zsql = "SELECT AppSeq FROM tbl_appraisalreview WHERE SSN ='" & SSN & "'and
Audit_Type = 'Processor'"
Set rstlog = dbslog.OpenRecordset(zsql, dbOpenSnapshot)
With rstlog
rstlog.MoveLast
If rstlog.RecordCount > 0 Then
App = !AppSeq
MsgBox "There is already one BE audit processed with this social and
App Sequence# " & App & " "
End If
End With
End Sub
****************************
I am trying to show Appseq # for a Social in the mssg box when a duplicate
social is entered. The above code works fine if the recordcount = 1. But I
have more than one record count for a social. Is ther any way I can show all
AppSeq's number for a social in the mSsg box.
For example: If I have 000-00-0000(SSn)/00(AppSeq)
000-00-0000/01
000-00-0000/02
Is it possible t modify the above code to get the mssg as "There exsists 3
BE audits processed with this social and App Sequence# "00","01","02"" wheh I
enter the social as 000-00-0000 in the form. Can anyone please advise me on
this.
Thanks.
I have below code in lost focus event.
****************************
Private Sub SSN_LostFocus()
Dim dbslog As Database, rstlog As Recordset, zsql As String, App As String
Set dbslog = CurrentDb
zsql = "SELECT AppSeq FROM tbl_appraisalreview WHERE SSN ='" & SSN & "'and
Audit_Type = 'Processor'"
Set rstlog = dbslog.OpenRecordset(zsql, dbOpenSnapshot)
With rstlog
rstlog.MoveLast
If rstlog.RecordCount > 0 Then
App = !AppSeq
MsgBox "There is already one BE audit processed with this social and
App Sequence# " & App & " "
End If
End With
End Sub
****************************
I am trying to show Appseq # for a Social in the mssg box when a duplicate
social is entered. The above code works fine if the recordcount = 1. But I
have more than one record count for a social. Is ther any way I can show all
AppSeq's number for a social in the mSsg box.
For example: If I have 000-00-0000(SSn)/00(AppSeq)
000-00-0000/01
000-00-0000/02
Is it possible t modify the above code to get the mssg as "There exsists 3
BE audits processed with this social and App Sequence# "00","01","02"" wheh I
enter the social as 000-00-0000 in the form. Can anyone please advise me on
this.
Thanks.