PDA

View Full Version : SetFocus



Mattster2020
07-03-2009, 06:12 AM
Afternoon All,

I am using Access 2000

I am able to setfocus on a control within Tabcontrol using the folowing code:

Forms![frm_timesheet_1]![Frm_Timesheet_Capture_1]![Timesheet_Week1]![Child16].Form!Monday_Lunch_Out.SetFocus

This works fine, however the actual tab does not move focus, but when I click on the appropiate tab the focus is on the control. Is there anyway to move setfocus on a tab and control?

Regards,

Matt

OBP
07-03-2009, 06:54 AM
From another tab it would be
Me.Parent.[Tab Or Subform Name].SetFocus
Sometimes you can address the Sub form on the Tab Directly, sometimes the Tab.

CreganTur
07-03-2009, 01:10 PM
Actually, you have to tell the control to move to the desired tab. I'm working from home today, so I'll have to provide example code on Monday.