A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

The Right Event



 
 
Thread Tools Display Modes
  #1  
Old August 12th, 2008, 03:13 PM posted to microsoft.public.access.forms
Doctor
external usenet poster
 
Posts: 75
Default The Right Event

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.
  #2  
Old August 12th, 2008, 03:50 PM posted to microsoft.public.access.forms
bcap[_2_]
external usenet poster
 
Posts: 260
Default The Right Event

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.

"Doctor" wrote in message
...
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.



  #3  
Old August 12th, 2008, 04:13 PM posted to microsoft.public.access.forms
Klatuu
external usenet poster
 
Posts: 7,074
Default The Right Event

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?


--
Dave Hargis, Microsoft Access MVP


"Doctor" wrote:

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.

  #4  
Old August 12th, 2008, 08:49 PM posted to microsoft.public.access.forms
Doctor
external usenet poster
 
Posts: 75
Default The Right Event

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!

"bcap" wrote:

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.

"Doctor" wrote in message
...
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.




 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:30 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.