SetFocus Problem

P

pjscott

I'm using sql 2000 and Access 2003.

I have a TripDate field and in the AfterUpdate I have code when a past date
is entered the user receives a message to enter a current date. The user
presses OK and the TripDate field clears. That part works fine but I can't
get the SetFocus to work.

After the user presses OK the cursor jumps to the TripTime field even though
I have TripDate.Setfocus. The TripDate Auto Tab is set to No.

Can anyone tell me how to set the focus on the TripDate field?

Thanks,

Paul
 
A

Allen Browne

Move the SetFocus code into the LostFocus event of the control.

AfterUpdate is too early for the SetFocus to work.
 
Top