Can't seem to focus (1 Viewer)

charityg

Registered User.
Local time
Today, 08:15
Joined
Apr 17, 2001
Messages
634
Alright you guys, time to pay the piper!

I'm having some SetFocus problems and maybe one of you can help.

I have a main form (frmRGAMain) with a command button (cmdProcess) and a tab control with a few pages.

On page1 I have a subform (subReturnPartDetail) that is set to continuous forms.

When I click my cmdProcess, I check certain textboxes on the main form and the subform I spoke of for null values. If any exist I zing the user to enter a value and move the focus to the empty textbox.

This works great 90% of the time, but I noticed while testing that if a textbox on the last row of the subform has the focus (where all controls are supposed to be null...it's continuous forms) I get the message.

I've tried entering some code in the onclick event of the cmdProcess to move the focus back to the main form before executing any code, but it's not working.

Any suggestions???

~Charity
 

Robert Saye

Registered User.
Local time
Today, 03:15
Joined
Jun 19, 2000
Messages
49
Hello Charity,

I really can't duplicate your form so I made do. You may try Me.Requery as the first line of the on click event for your command button. (That is if your Main form gets the focus when you open the form.) Just a thought...

Robert
 

charityg

Registered User.
Local time
Today, 08:15
Joined
Apr 17, 2001
Messages
634
I was hesitant to use a refresh, because I knew it would bump me to the first record, but I guess I wasn't thinking, because I have the form sorted descending on the entry number anyway. So the current record will always be the first one.

Anyway, Thanks! It works.
 

Users who are viewing this thread

Top Bottom