473,385 Members | 1,753 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,385 software developers and data experts.

after update handling

I want to put one and same function under 2 controls in my subform.
The controls are
called quantity and cartons. Is it posible to build a code that
recognizes the after update event of the controls quantity and
cartons. In other words, my code must
recognize the after update events of the control and the
cartons.Something of the following order

If Me![MySubform].[Form].[Quantity].AfterUpdfate = True Then
Do Something
Else If Me![MySubform].[Form].[cartons].AfterUpdate = True Then
Do something
End If
Nov 12 '05 #1
2 1507
You can write the procedure in one event, and call it from the other, e.g.:

Private Sub Quantity_AfterUpdate()
Do Something
End Sub

Private Sub Cartons_AfterUpdate()
Call Quantity_AfterUpdate
End Sub

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Johm" <ke**@abv.bg> wrote in message
news:24**************************@posting.google.c om...
I want to put one and same function under 2 controls in my subform.
The controls are
called quantity and cartons. Is it posible to build a code that
recognizes the after update event of the controls quantity and
cartons. In other words, my code must
recognize the after update events of the control and the
cartons.Something of the following order

If Me![MySubform].[Form].[Quantity].AfterUpdfate = True Then
Do Something
Else If Me![MySubform].[Form].[cartons].AfterUpdate = True Then
Do something
End If

Nov 12 '05 #2
On Sun, 15 Feb 2004 19:57:33 +0800, Allen Browne wrote:
You can write the procedure in one event, and call it from the other, e.g.:

Private Sub Quantity_AfterUpdate()
Do Something
End Sub

Private Sub Cartons_AfterUpdate()
Call Quantity_AfterUpdate
End Sub


Alternatively, create a private Sub or function within the form like...
ControlUpdate(cntrl as Control) As Boolean (or otherwise)

Each control that calls this must simply pass it's refference as the
argument (Me!ControlName). This is sometimes better when the validations on
the control are the same, but actions taken might be different - less Cases
/ Ifs to deal with.
--
Mike Storr
veraccess.com
Nov 12 '05 #3

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

Similar topics

6
by: Karen Middleton | last post by:
In MS Access I can do in one SQL statement a update if exists else a insert. Assuming my source staging table is called - SOURCE and my target table is called - DEST and both of them have the...
7
by: Jean-Marc Blaise | last post by:
Hi, The dev center calls sqlj.DB2_UPDATEJARINFO ('JMARC.JMB','JMB','file:JMB.sqlj') to update the sqlj routine source. I tried in CLP from the directory containing jar and sqlj files (Windows...
11
by: DFS | last post by:
Architecture: Access 2003 client, Oracle 9i repository, no Access security in place, ODBC linked tables. 100 or so users, in 3 or 4 groups (Oracle roles actually): Admins, Updaters and ReadOnly....
5
by: Ken Cox [Microsoft MVP] | last post by:
MS has posted this here: http://www.asp.net/faq/ms03-32-issue.aspx Fix for: 'Server Application Unavailable' Error after Applying Security Update for IE...
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...
0
by: Carlos | last post by:
Hi all, I posted a question about a checkbox template column that needs to keep its values after a column in a GridView is sorted. This checkbox is bound to a bit field in the database, and I am...
5
by: gibble | last post by:
Hi, I am going crazy. We get a hundred or so of these errors each day and while the fix would seem obvious, the error does not include a line number! -------------------- Process...
0
by: magnolia | last post by:
i created a trigger that will record the changes made to a table .everything works fine except the insert query.whenerever i try to insert a record it fires insert and update triger at the same time...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.