Set Focus in Form From SubForm

R

RitaG

Hi.

I checked the Access group for this issue where I have a form with a
subform. When I'm working in the subform and a validation error occurs, I
need to set the focus on a control on the main form.

I tried several suggestions that I found in the discussion group but am
still having a problem setting the focus on the main form from the subform.

Here's what I'm trying while in the subform:
Me.Parent!txtBaseSCRID.SetFocus

I aslo tried this:
Me.Parent.txtBaseSCRID.SetFocus

And this:
Me.Parent.SetFocus
Me.Parent!txtBaseSCRID.SetFocus.

I get an error number 2110: Microsoft Access can't move the focus to the
control txtBaseSCRID. I verified that I have the correct control name
(txtBaseSCRID).

TIA.

Rita
 

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

Top