After Update Move Focus to Subform

  • Thread starter Thread starter mattc66 via AccessMonster.com
  • Start date Start date
M

mattc66 via AccessMonster.com

I have a Drop Down box on a main form that finds an item. One it find the
item in the after update event I want the cursor to move the a field in my
subform.

I tried the below code:
Me.Form![subForm].Form![FieldName].SetFocus

It didn't work?
 
AfterUpdate is possibly too early to do this.
You could use the LostFocus event of the combo.
Explicitly save the record first (assuming the main form is bound).

You also need to set focus to the subform control first (so it becomes the
active control of the main form).

Result:
Me.Dirty = False
Me.[subForm].SetFocus
Me.[subForm].Form![FieldName].SetFocus

It might be possible to set the Tab Order of the form and the Tab Stop of
the controls so that it automatically goes to the subform control without
any code.

(Presumably subForm and FieldName are just examples, not the actual names.)
 
AUTO-REPLY From George Levitt

Please allow this to confirm a system receipt of your e-mail.

I am out of the office until Wednesday morning (1/12/05) and will not be
reviewing or responding to email or voicemail until that time.

I look forward to replying to your message on Wednesday.

Thanks and warmest regards, George
 
AUTO-REPLY From George Levitt

Please allow this to confirm a system receipt of your e-mail.

I am out of the office until Wednesday morning (1/12/05) and will not be
reviewing or responding to email or voicemail until that time.

I look forward to replying to your message on Wednesday.

Thanks and warmest regards, George
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top