Which control has focus? (1 Viewer)

PaddyIrishMan

Registered User.
Local time
Today, 04:16
Joined
Jun 5, 2002
Messages
166
Hi all,
In my database I've replaced my usual text boxes with RTB controls so I can apply extra formatting.
I'm creating a set of buttons or a menu item to control Bullets, Bold, Italics etc.

The problem I'm having is determining which control has focus.

Ie. in order for my buttons to work I need to be able to reference the active control on the form to apply the formatting to.
If the user has selected text in the Comments field & clicks on the Bold button then I need to say

rtbComments.SelBold = True

Only 2 fields will be available for formatting, rtbComments & rtbDescription. So I just need to be able to distinguish whether either of these had focus before the Bold button was clicked.

Any help appreciated,
Regards,
Patrick.
 

PaddyIrishMan

Registered User.
Local time
Today, 04:16
Joined
Jun 5, 2002
Messages
166
Sorry I've answered my own question:

Screen.PreviousControl

Thanks,
Patrick.
 

Users who are viewing this thread

Top Bottom