I wanted to put some VBA code on the notes window for inventory control. I included the window in VBA and the relevant fields, and added code, but this code runs even when notes window is opened from say customer cards. What variables define whether this window is opened from inventory cards. Please help.