Which event?

J

Joe M.

I'm trying to determine which event is triggered when the contents of a text
box bound to a query changes? I've tried putting stop in every event but it
seems none of them are triggered. Can someone help?

Thanks,
JM
 
J

Jeff Boyce

I guess I'm not understanding how you have "the contents of a text box bound
to a query". I'd have thought that you'd have a form bound to a query ...
if that's the case, have you tried the OnChange event?

Regards

Jeff Boyce
Microsoft Access MVP
 
S

Stefan Hoffmann

hi Joe,
I'm trying to determine which event is triggered when the contents of a text
box bound to a query changes? I've tried putting stop in every event but it
seems none of them are triggered. Can someone help?
Only the change event of the text box is triggered.

mfG
--> stefan <--
 
J

Joe M.

Jeff,

I guess I haven't explained myself well. I have a subform which contains
text boxes that are populated by a query's results. When the results change,
thus the contents of the text box changes. I would like to have a particular
action occur when the contents of the text box changes. I'm trying to
dertemine which event is triggered.

Thanks again,
JM
 
K

Klatuu

No events are fired by the value in the control changing by moving to a
different record, requerying the recordset, or if the value is changed
programmatically. Some Text Box events fire when the user navigates to the
control like the Got focust, etc. and some only fire when the value changes.
Here are some examples.
Change event - Fires each time a character is typed into the control. For
example if I enter my first name, it would be:
D
Change event
A
Change event
V
Change event
E
Change event

Then when the user tabs out in you will get the Before Update event, After
Update Event and Lost Focus (I may be wrong about when the Lost Focus fires,
but I am sure someone will correct me if I am wrong)

Now, rather than focus on a HOW TO, describe what you are trying to do, and
I am sure we can help with the HOW TO.
 
F

Frank H

So, in other words, the subform Source form's recordsource is provided by
your query? If not, then more info is required to identify your situation.
In the above case, the text boxes may change when the subform's form
requeries. It sounds like the closest event would be the OnCurrent event of
the subform's form, since whenever the form requeries, the OnCurrent ends up
getting triggered.
 
J

Jeff Boyce

I withdraw my earlier suggestion ... I agree with the others pointing to the
OnCurrent event...

Jeff
 
J

John W. Vinson

Only the change event of the text box is triggered.

ummm... actually it isn't. That's triggered only when the user types a
keystroke in the textbox.
 
S

Stefan Hoffmann

hi John,
ummm... actually it isn't. That's triggered only when the user types a
keystroke in the textbox.
Indeed. I haven't read the question carefully enough.


mfG
--> stefan <--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top