HalloweenWeed
Member
- Local time
- Today, 08:57
- Joined
- Apr 8, 2020
- Messages
- 213
OK, it works (before entry) now. IDK if it works on entry yet, not tested, not the point. But I needed to remove the linking between the master and child forms, then put in this bit of code:The problem is almost certainly the two subforms. I can't figure out what they are for. I'm getting an error message that I can't save a record because a related record is required in tblActiveDirectory. Looks like the relationship is backwards.
Code:
Option Compare Database
Option Explicit
Private Sub Form_AfterInsert()
If txtCashAcctID < 1 Then txtCashAcctID = Me.Form.subAcctDfltCash![AcctTblKey]
End Sub
This sets the Cash Account in the transaction. The field is only ever zero on a new record.
Latest build attached.