473,324 Members | 2,581 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

after update not triggered

I'm trying to use a "keypad" form (with command buttons for numbers 0
thru 9) I developed to allow users to first click a textbox on one
form, then click a number on the keypad and have the value entered in
the textbox. It's all seemingly working except that I have an
AfterUpdate event set for the textboxes and that event is NOT triggered
when I use the keypad to enter data. If I enter numbers with the
regular keyboard, the even is triggered. What's the difference between
values entered via the virtual keypad vs. the real keyboard? Why would
using the keypad not precipitate the AfterUpdate event?

Just for yucks, here's some of the code in the "keypad" form:

Private Function f_NumberClick(sValue As String)

'MsgBox Forms(sPrevious).ActiveControl.Form.ActiveControl. Name
If Forms(sPrevious).ActiveControl.ControlType = acSubform Then
Forms(sPrevious).ActiveControl.Form.ActiveControl =
Forms(sPrevious).ActiveControl.Form.ActiveControl & sValue
'[Form_frm_plot_species_compNonVasc_FD].ActiveControl =
[Form_frm_plot_species_compNonVasc_FD].ActiveControl & sValue
'Forms(sPrevious).ActiveControl.Form.Refresh
'Forms(sPrevious).ActiveControl.Form.Requery
Else
Forms(sPrevious).ActiveControl = Forms(sPrevious).ActiveControl &
sValue
'[Form_frm_plot_species_compNonVasc_FD].ActiveControl =
[Form_frm_plot_species_compNonVasc_FD].ActiveControl & sValue
'Forms(sPrevious).ActiveControl.Parent.Refresh
'Forms(sPrevious).ActiveControl.Parent.Requery
End If
Forms(sPrevious).Refresh
Forms(sPrevious).Requery
==============================================
The sPrevious variable (name of the target form) is passed to the
"keypad" form when it is opened from a button on the form with the
textboxes that will be taking the data. Each numbered command button on
the keypad form simply calls the above function and passes it's value.
The above function is designed to work on subforms too.

Thanks for any help.

Doug
Fairbanks, AK

Dec 21 '05 #1
6 3045
On 21 Dec 2005 15:17:44 -0800, "Dugo" <Do*********@nps.gov> wrote:
I'm trying to use a "keypad" form (with command buttons for numbers 0
thru 9) I developed to allow users to first click a textbox on one
form, then click a number on the keypad and have the value entered in
the textbox. It's all seemingly working except that I have an
AfterUpdate event set for the textboxes and that event is NOT triggered
when I use the keypad to enter data. If I enter numbers with the
regular keyboard, the even is triggered. What's the difference between
values entered via the virtual keypad vs. the real keyboard? Why would
using the keypad not precipitate the AfterUpdate event?


You can add a line to your procedure which invokes the after update
event yourself, can't you?

mike
Dec 22 '05 #2
Dugo wrote in message
<11**********************@z14g2000cwz.googlegroups .com> :
I'm trying to use a "keypad" form (with command buttons for numbers 0
thru 9) I developed to allow users to first click a textbox on one
form, then click a number on the keypad and have the value entered in
the textbox. It's all seemingly working except that I have an
AfterUpdate event set for the textboxes and that event is NOT triggered
when I use the keypad to enter data. If I enter numbers with the
regular keyboard, the even is triggered. What's the difference between
values entered via the virtual keypad vs. the real keyboard? Why would
using the keypad not precipitate the AfterUpdate event?

Just for yucks, here's some of the code in the "keypad" form:

Private Function f_NumberClick(sValue As String)

'MsgBox Forms(sPrevious).ActiveControl.Form.ActiveControl. Name
If Forms(sPrevious).ActiveControl.ControlType = acSubform Then
Forms(sPrevious).ActiveControl.Form.ActiveControl =
Forms(sPrevious).ActiveControl.Form.ActiveControl & sValue
'[Form_frm_plot_species_compNonVasc_FD].ActiveControl =
[Form_frm_plot_species_compNonVasc_FD].ActiveControl & sValue
'Forms(sPrevious).ActiveControl.Form.Refresh
'Forms(sPrevious).ActiveControl.Form.Requery
Else
Forms(sPrevious).ActiveControl = Forms(sPrevious).ActiveControl &
sValue
'[Form_frm_plot_species_compNonVasc_FD].ActiveControl =
[Form_frm_plot_species_compNonVasc_FD].ActiveControl & sValue
'Forms(sPrevious).ActiveControl.Parent.Refresh
'Forms(sPrevious).ActiveControl.Parent.Requery
End If
Forms(sPrevious).Refresh
Forms(sPrevious).Requery
==============================================
The sPrevious variable (name of the target form) is passed to the
"keypad" form when it is opened from a button on the form with the
textboxes that will be taking the data. Each numbered command button on
the keypad form simply calls the above function and passes it's value.
The above function is designed to work on subforms too.

Thanks for any help.

Doug
Fairbanks, AK


I think the after update event of controls only fire after "manually"
entering the value, as you've found. I think you can either

- fire of the After update event through calling it in code in your
virtual keyboard code
- setting focus to a control, and using assigning to it's .Text
property
in stead of the default .Value property, I think might fire the After
update event of it

--
Roy-Vidar

Dec 22 '05 #3
Thanks. I simply changed it to use .Text and it's now working. But I've
caused myself a new, related problem. Each time a button on the virtual
keypad is clicked, it updates the .Text of the target control and fires
off the afterupdate event is triggered. But if you want to use more
than one number from the keypad, for example enter "25", the
afterupdate is triggered on the "2" and the "5" but I want it to
trigger only once (since "25" is the complete value for that textbox).

So I've gone from having no afterupdate triggers to too many of them.
How do I have it trigger afterupdate only when the user is done
entering data?

Thanks again,
Doug

Dec 22 '05 #4
Dugo wrote in message
<11**********************@g14g2000cwa.googlegroups .com> :
Thanks. I simply changed it to use .Text and it's now working. But I've
caused myself a new, related problem. Each time a button on the virtual
keypad is clicked, it updates the .Text of the target control and fires
off the afterupdate event is triggered. But if you want to use more
than one number from the keypad, for example enter "25", the
afterupdate is triggered on the "2" and the "5" but I want it to
trigger only once (since "25" is the complete value for that textbox).

So I've gone from having no afterupdate triggers to too many of them.
How do I have it trigger afterupdate only when the user is done
entering data?

Thanks again,
Doug


Ah, that's probably out of my league, I'm afraid.

Just thinking, don't know if it's any help at all, but what you
probably need,
is to find events/actions that mimick the keystrokes that triggers the
after
update from the keyboard (like Enter or Tab, for instance), then use
those to
call your code.

--
Roy-Vidar

Dec 22 '05 #5
Or have the keypad first put the value the user wants in the textbox
into a control on the keypad form and then have a button on the keypad
to "assign" or "insert" that value into the textbox. But that's one
more step I'd like to avoid if possible.

Dec 22 '05 #6
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

You should be using the OnChange event, not the AfterUpdate event to add
new characters to the other control.

OnChange occurs when the user types something into the Control.

AfterUpdate occurs when the user exits the control.
--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQ7HBx4echKqOuFEgEQLOVwCgjuDTSOSSXJxP/Nv/f+5nkUUIllcAn2t2
SY+i1SW24aoHEwzNTqNd2S5l
=kurp
-----END PGP SIGNATURE-----

Dugo wrote:
I'm trying to use a "keypad" form (with command buttons for numbers 0
thru 9) I developed to allow users to first click a textbox on one
form, then click a number on the keypad and have the value entered in
the textbox. It's all seemingly working except that I have an
AfterUpdate event set for the textboxes and that event is NOT triggered
when I use the keypad to enter data. If I enter numbers with the
regular keyboard, the even is triggered. What's the difference between
values entered via the virtual keypad vs. the real keyboard? Why would
using the keypad not precipitate the AfterUpdate event?

Just for yucks, here's some of the code in the "keypad" form:

Private Function f_NumberClick(sValue As String)

'MsgBox Forms(sPrevious).ActiveControl.Form.ActiveControl. Name
If Forms(sPrevious).ActiveControl.ControlType = acSubform Then
Forms(sPrevious).ActiveControl.Form.ActiveControl =
Forms(sPrevious).ActiveControl.Form.ActiveControl & sValue
'[Form_frm_plot_species_compNonVasc_FD].ActiveControl =
[Form_frm_plot_species_compNonVasc_FD].ActiveControl & sValue
'Forms(sPrevious).ActiveControl.Form.Refresh
'Forms(sPrevious).ActiveControl.Form.Requery
Else
Forms(sPrevious).ActiveControl = Forms(sPrevious).ActiveControl &
sValue
'[Form_frm_plot_species_compNonVasc_FD].ActiveControl =
[Form_frm_plot_species_compNonVasc_FD].ActiveControl & sValue
'Forms(sPrevious).ActiveControl.Parent.Refresh
'Forms(sPrevious).ActiveControl.Parent.Requery
End If
Forms(sPrevious).Refresh
Forms(sPrevious).Requery
==============================================
The sPrevious variable (name of the target form) is passed to the
"keypad" form when it is opened from a button on the form with the
textboxes that will be taking the data. Each numbered command button on
the keypad form simply calls the above function and passes it's value.
The above function is designed to work on subforms too.

Thanks for any help.

Doug
Fairbanks, AK

Dec 27 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: John Ramsden | last post by:
I have a PHP script that is run via a 'wget' command within an MS SQL trigger, and relies on accessing the database record updated by the SQL statement that triggered the script in the first...
2
by: Lo?c Mah? | last post by:
Hello I have a problem to update the content of a wx.Panel already displayed after changing a variable, used to define the wx.Panel content. I have the following elements in my code: ...
0
by: Ferindo Middleton Jr | last post by:
I am trying to write a Perl Function for one of the databases I'm building a web application for. This function is triggered to occur BEFORE INSERT OR UPDATE. This function is complex in that it...
7
by: Alex | last post by:
Hi all, I am trying to install a java stored procedure via the windows development centre. The linux box is running 8.1 FP4 as is the windoze platform. If I am on the linux box i can install...
0
by: rabbit | last post by:
Hi all, i work at moment with DB2 XML Extender und want to update the element's value in the xml documents. I store the xml data in xmlclob column. Using the following commando ...
9
by: James Butler | last post by:
Our setup: Online db: MySQL Inhouse db: MS Access 97 with MySQL tables linked via ODBC Our issue: Almost every field updates successfully, except one. A scenario: Information is written to...
1
by: branton ellerbee | last post by:
what is the problem with this pos language? I have run into this problem time and time again and never sure what I do to fix it. I have a update to a database, then I call sub to re-bind the...
0
by: Mark Denardo | last post by:
Hi, I'm trying to record the text value of a RichTextBox after handling a KeyPressEvent (each time the user types a char). But what I'm seeing is that the value of rtb.Text is equal to the value...
5
by: Mike Nolan | last post by:
I have a before insert trigger that updates a value in another table. It appears that I cannot depend upon that update having taken place in an after insert trigger on the first table. (The one...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.