I am using a main form with several subforms. The On Current events run when the main form record is changed. However, I am trying to restrict some of the code unless the subform has focus. The code that I was trying is (code located in the subform)
' Set Total Amount Due if Billing Form has focus
If Screen.ActiveControl.Name = "frmBillings" Then
Tbox_TotalAmtDue.Value = tmpBalanceDue
End If
However, I get the following message
Error 2474: The expression you entered requires the control to be in the active window.
Is there an approach that will accomplish such a process? Not sure about global variable (not my favorite approach to programming).
Using Windows 10, 8.1 and 7 with access 2010.
Rod
__._,_.___
Posted by: desertscroller@cox.net
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (1) |
.
__,_._,___
Tidak ada komentar:
Posting Komentar