Problems with Tab

  • Thread starter Thread starter Linda RQ
  • Start date Start date
L

Linda RQ

Hi Everyone,

Access 2003. I have a Main form with 2 subforms in the detail sections of
my Main form. I have 7 controls to enter data in, patient info. All of
these work fine and in order the first control is tab stop 0. I have
subform 1 Pt Location as tab stop 7, the 5 controls in there are in order
starting with 0 and once in that form those work fine. My problem is, when
I add a new record to my main form and fill in some of the 7 controls then
hit the tab key or click in the first control on my location subform I get
switched to an existing record with the focus on tab stop 0 of the Pt
Location subform and I have to go back and find the record I was in the
process of adding then I can click in the first field of my Pt location form
and enter it. If I tab through a new record without entering any data in
any controls, the tabs work perfectly.

Thanks,
Linda
 
Linda,

I assume that you have some kind of requery method set up in the parent form
so that when you move to the next/previous record, your subform will display
correlated data. My question is this... On what event do you do the requery?
If you aren't doing it OnCurrent, then this could be your problem.

That's what it sounds like.
 
Hi Devlin,

On Load I have a maximize macro, and on Got Focus I also have a mizimize
macro because when I go to a report then come back, the form was not
maximized. I have had a lot of help with code so I don't know for sure what
it's doing but this is what I have in the properties of my parent form.


Private Sub Form_AfterUpdate()

Me.Requery

End Sub
 
Linda,

What is happening in the After Update Event of the main form is
that when you leave the main form it gets requeried as you wrote
the code for it to do. This sets the pointer back to the firs
record.

You should use Me.Refresh instead of Me.Requery.

HTH,

Joe
 
Back
Top