|
' (tel 1st read)
If Not IsNull(Me.TEL_SRC) And IsNull(Me.KNM_SRC) And (FLG1st = " ") Then
RS.MoveFirst
' (携帯-1 find)
CRITERIA = "TEL-H1-M LIKE '*" & Me.TEL_SRC & "*'"
RS.Find CRITERIA, 0, adSearchForward
If RS.EOF Then
' (携帯-2 find)
RS.MoveFirst
CRITERIA = "TEL-H2-M LIKE '*" & Me.TEL_SRC & "*'"
RS.Find CRITERIA, 0, adSearchForward
If RS.EOF Then
' (自宅-1 find)
RS.MoveFirst
CRITERIA = "TEL-J1-M LIKE '*" & Me.TEL_SRC & "*'"
RS.Find CRITERIA, 0, adSearchForward
If RS.EOF Then
' (自宅-2 find)
RS.MoveFirst
CRITERIA = "TEL-J2-M LIKE '*" & Me.TEL_SRC & "*'"
RS.Find CRITERIA, 0, adSearchForward
If RS.EOF Then
' (電話該当なし)
MsgBox ("該当データありません"), vbOKOnly
Exit Sub
' (自宅-2 match)
Else
Forms!MASTER.bookmark = RS.bookmark
BKMARK = RS.bookmark
FLG1st = "on-j2"
Exit Sub
End If
' (自宅-1 match)
Else
Forms!MASTER.bookmark = RS.bookmark
BKMARK = RS.bookmark
FLG1st = "on-j1"
Exit Sub
End If
' (携帯-2 match)
Else
Forms!MASTER.bookmark = RS.bookmark
BKMARK = RS.bookmark
FLG1st = "on-h2"
Exit Sub
End If
' (携帯-1 match)
Else
Debug.Print RS.bookmark
Forms!MASTER.bookmark = RS.bookmark
BKMARK = RS.bookmark
FLG1st = "on-h1"
Exit Sub
End If
End If
サブフォームを使用しています。サブフォームの部分を削除して実行した場合は
正常に動いています。顧客マスターDBと履歴DBのリレーションが壊れているのでしょうか?
|
|