The Right Event

  • Thread starter Thread starter Doctor
  • Start date Start date
D

Doctor

I am looking for an event that fires when I change to a new record.

Here is what I am trying to accomplish:

I have a subform that has a combo box in it that querys only classes that
the teacher in the main form is able to teach.

The form loads right. and selects the right classes. However when I move to
the next teacher, the combo box still contains the last query. I've tried
everything I know. I thought that the OnCurrent Event would work but it
doesn't.

Could anyone point me in the right direction for the right event that will
run even when just viewing a new record?

thanks so much in advance.
 
The OnCurrent event is exactly the right place to requery the combo box.
Maybe something wrong with your code? Can you post it?

Another possibility is that you are using a split form in Access 2007. If
you use the datasheet portion of a split form to change records, the
OnCurrent event fires, but the field values available to your code are *for
the record you just left*, not the one you are going to.

There's no workaround for this that I can find.

Can people *please* state what version they are using. With A2007 being so
different, this is more important than ever.
 
The Current event is the correct event. It fires each time you change
records, regardless of whether the record is new or existing.

How is the combo box in the subform filtered? It is a bound control?
 
Ahh!! I feel kinda dumb. In my subform there were several combo boxes to
requery On Current. I thought the main combo box was in there, but it wasn't.
Thanks guys!
 
Back
Top