Now I'm becoming really curious.
Here's the function triggered by one of the right-click options, "Delete Transaction":
(Note that I've followed Ajax's suggestion of using a function to return the current value of lngCurRecID to "Condition #1".
And, that the delTran function is still in development, hence the MsgBox statements to pre-test logic flow.)
Code:
Public Function delTran()
'*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
' Right-click choice to delete transaction Me.TRecID comes here.
'*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
Dim strPromptMsg As String
Dim strSQL As String
Dim strTemp As String
lngCurRecID = Me.TRecID
If (Me.TTypeID = 3 Or Me.TTypeID = 10) Then
If Me.AcctID = 1 Then
MsgBox "You cannot delete a transfer between the BofA Savings." & vbNewLine & _
"Create a 'NEW' transaction to effect desired change."
lngCurRecID = 0
Exit Function
Else
strPromptMsg = "Delete eBud account transfer Dated " & Me.tbTDate & _
" in the amount of $" & Me.tbDebit & Me.tbCredit & "?"
If MsgBox(strPromptMsg, vbYesNo) = vbYes Then _
MsgBox "Transaction poised to be deleted."
End If
Else
MsgBox "ONLY eBud account transfer transactions can be deleted (reversed)."
End If
lngCurRecID = 0
End Function
Private Function fnCurRec() As Long
fnCurRec = lngCurRecID
End Function
And here's the revised conditional formatting for one of the tb's in the continuous form:
I put a Break at statement "fnCurRec = lngCurRecID", but the break DOES NOT occur nor, obviously, does the formatting take effect.
Isn't this fun!!