GK in the UK
Registered User.
- Local time
- Today, 09:39
- Joined
- Dec 20, 2017
- Messages
- 274
On my invoice/order form I have a sub form with a function ViewTransaction to open a pop-up form for that datasheet line.
On the double-click event of every field in the datasheet I have: =ViewTransaction
So double-clicking anywhere on the line opens the pop-up.
On the host form I also have a button View Line Detail which opens the same pop-up, so I have duplicated code which I want to consolidate to the main form.
I was about to set up a WithEvents on the double-click event and deal with it all in once place, but it occurred to me I have 8 fields on the sub form datasheet.
Must I set up a WithEvents for each field on the datasheet or is there an easier way ?
On the double-click event of every field in the datasheet I have: =ViewTransaction
So double-clicking anywhere on the line opens the pop-up.
On the host form I also have a button View Line Detail which opens the same pop-up, so I have duplicated code which I want to consolidate to the main form.
I was about to set up a WithEvents on the double-click event and deal with it all in once place, but it occurred to me I have 8 fields on the sub form datasheet.
Must I set up a WithEvents for each field on the datasheet or is there an easier way ?