Which On Event to use ??

Snowflake68

Registered User.
Local time
Today, 09:35
Joined
May 28, 2014
Messages
464
Does anyone know if there is an event which I can use that will trigger only when a user manually changes a value in a text box on a form.

I have an afterupdate event running which runs a calculation to update the same text box but I also want to allow the user to enter a value in that text box but I need to trigger another event when they do this.

I have tried onChange event but that triggers as soon as they enter a single character but I want it to trigger after they tab out of it.
 
The after update does exactly what you are describing? Maybe I've lost something in translation.
 
The after update does exactly what you are describing? Maybe I've lost something in translation.

Sorry, I didnt explain myself properly.

I have a form with a textbox to display a total value
the text box is updated with the total value when the user makes their selection from two combo boxes (qty and type) this then calculates the total and updates the textbox which then triggers an afterupdate event to update values in a table.

The user can also manually enter a total value in the textbox and I want to trigger something else (reset the values in combo boxes to empty) when they type in a value so I need to differentiate between the system updating the text box and the user manually typing in the text box.
 
Can't you use a textbox event trigger?

Edit: OnExit trigger?
 
Normally vba code doesn't fire the after update code of a control, so you must be making it do that. If you removed that then the after update code could do what you need it to do.
Can you show us how you are updating the textbox from the combo boxes ?
 
Normally vba code doesn't fire the after update code of a control, so you must be making it do that. If you removed that then the after update code could do what you need it to do.
Can you show us how you are updating the textbox from the combo boxes ?

Yes you are absolutely correct :eek: silly silly me :p

the code I have behind the afterupdate event on the text box is not even running and I thought it was. The same code is running on the afterupdate event on the combo boxes hence why I thought it was running.

To test this I just added a message box to the afterupdate event on the text box to see if it popped up when I changed the combo box but it didnt so you are correct.

I can just use the afterupdate event on the text box now when the user manually enters a value. Perfect :D

Thanks for helping me sort this out, it is very much appreciated.
 

Users who are viewing this thread

Back
Top Bottom